diff --git a/build/cocos2d-win10.sln b/build/cocos2d-win10.sln new file mode 100644 index 0000000000..07f54c2bc2 --- /dev/null +++ b/build/cocos2d-win10.sln @@ -0,0 +1,123 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{17093B03-00CA-402F-981A-D8C84B2922B5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win10\libSpine.vcxproj", "{4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj-win10\libbox2d.vcxproj", "{0C32D479-46D5-46C3-9AA9-0A8FF8320516}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj", "{07C2895D-720C-487D-B7B4-12C293EA533F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win10\cpp-empty-test.vcxproj", "{87ED86E7-A850-433F-88D5-D5F65CFF7BF5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win10\cpp-tests.vcxproj", "{C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\external\bullet\proj.win10\libbullet.vcxproj", "{ECEE1119-CE2E-4F7E-83A8-1932EA48E893}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.ActiveCfg = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.Build.0 = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.ActiveCfg = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.Build.0 = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.ActiveCfg = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.Build.0 = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.ActiveCfg = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.Build.0 = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.ActiveCfg = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.Build.0 = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.ActiveCfg = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.Build.0 = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.ActiveCfg = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.Build.0 = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.ActiveCfg = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.Build.0 = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.ActiveCfg = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.Build.0 = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.ActiveCfg = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.Build.0 = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.ActiveCfg = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.Build.0 = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.ActiveCfg = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.Build.0 = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.ActiveCfg = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.Build.0 = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.ActiveCfg = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.Build.0 = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.ActiveCfg = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.Build.0 = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.ActiveCfg = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.Build.0 = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.ActiveCfg = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.Build.0 = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.ActiveCfg = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.Build.0 = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.ActiveCfg = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Build.0 = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|ARM.Deploy.0 = Debug|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.ActiveCfg = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Build.0 = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x64.Deploy.0 = Debug|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.ActiveCfg = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Build.0 = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Debug|x86.Deploy.0 = Debug|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.ActiveCfg = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Build.0 = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|ARM.Deploy.0 = Release|ARM + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.ActiveCfg = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Build.0 = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x64.Deploy.0 = Release|x64 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.ActiveCfg = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Build.0 = Release|Win32 + {87ED86E7-A850-433F-88D5-D5F65CFF7BF5}.Release|x86.Deploy.0 = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.ActiveCfg = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Build.0 = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|ARM.Deploy.0 = Debug|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.ActiveCfg = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Build.0 = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x64.Deploy.0 = Debug|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.ActiveCfg = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Build.0 = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Debug|x86.Deploy.0 = Debug|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.ActiveCfg = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Build.0 = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|ARM.Deploy.0 = Release|ARM + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.ActiveCfg = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Build.0 = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x64.Deploy.0 = Release|x64 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.ActiveCfg = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Build.0 = Release|Win32 + {C1307B42-D00A-4B88-BCDD-0A16A81FF4C1}.Release|x86.Deploy.0 = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.ActiveCfg = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.Build.0 = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.ActiveCfg = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.Build.0 = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.ActiveCfg = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.Build.0 = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.ActiveCfg = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.Build.0 = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.ActiveCfg = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.Build.0 = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.ActiveCfg = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8} = {17093B03-00CA-402F-981A-D8C84B2922B5} + {0C32D479-46D5-46C3-9AA9-0A8FF8320516} = {17093B03-00CA-402F-981A-D8C84B2922B5} + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893} = {17093B03-00CA-402F-981A-D8C84B2922B5} + EndGlobalSection +EndGlobal diff --git a/cocos/2d/MarchingSquare.cpp b/cocos/2d/MarchingSquare.cpp index 773e51e7e8..b59b1502d6 100644 --- a/cocos/2d/MarchingSquare.cpp +++ b/cocos/2d/MarchingSquare.cpp @@ -257,8 +257,8 @@ void MarchingSquare::marchSquare(int startx, int starty) { //TODO: we triangulation cannot work collineer points, so we need to modify same point a little //TODO: maybe we can detect if we go into a hole and coming back the hole, we should extract those points and remove them - points.back().x -= 0.00001; - points.back().y -= 0.00001; + points.back().x -= 0.00001f; + points.back().y -= 0.00001f; points.push_back(Vec2((float)curx, (float)height-cury)/ scaleFactor); } else{ diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj new file mode 100644 index 0000000000..a6df06194a --- /dev/null +++ b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj @@ -0,0 +1,1616 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + false + false + false + false + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + NotUsing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {ecee1119-ce2e-4f7e-83a8-1932ea48e893} + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + DynamicLibrary + libcocos2d + libcocos2d + en-US + 14.0 + true + Windows Store + 8.2 + 10.0.10069.0 + 10.0.10069.0 + + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + DynamicLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + false + false + libcocos2d_v3.7_Windows_10.0 + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + ProgramDatabase + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + + + Console + false + false + + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + ProgramDatabase + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + ProgramDatabase + + + Console + false + false + + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + EditAndContinue + + + Console + false + false + + + + + Use + true + pch.h + _USRDLL;_LIB;COCOS2DXWIN32_EXPORTS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + false + 4458;4459;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\zlib\include;$(EngineRoot)external\freetype2\include\win10\freetype2;$(EngineRoot)external\protobuf-lite\src;$(EngineRoot)external\protobuf-lite\win32;%(AdditionalIncludeDirectories) + /Zm384 /bigobj %(AdditionalOptions) + false + + + Console + false + false + + + + + + + \ No newline at end of file diff --git a/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters new file mode 100644 index 0000000000..c79856b76e --- /dev/null +++ b/cocos/2d/libcocos2d_win10/libcocos2d.vcxproj.filters @@ -0,0 +1,3862 @@ + + + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tga;tiff;tif;png;wav;mfcribbon-ms + + + {7a1f75b9-e286-444c-9469-0cf18caf9851} + + + {0fee395c-63c7-44c6-a4f4-1f36e2c87bb8} + + + {50c0af16-c916-4fa8-9fa2-b86e38449e26} + + + {5aeb6e4f-9e25-4b88-b583-fa11189743a0} + + + {cfeb83ba-f330-49a3-a32f-4360729feb34} + + + {48ef00ff-acc8-4c9c-a6e4-00d72e737ad2} + + + {f2236b85-0526-49e2-a18c-ac4951062666} + + + {33f548c2-d835-4404-9e44-ad1511588c8e} + + + {26495053-242d-4ec8-bf5a-6ea6f5ac4000} + + + {94bbb957-b493-45d2-9f5a-753ac1ab78ce} + + + {a2141e87-a561-433e-905b-63ff5c4e0e6e} + + + {661c905d-7ec2-4161-8b09-1c22ddefb830} + + + {6b13d475-62b0-4d73-8cee-52f077aa3fe7} + + + {33af945f-9ffb-4e87-9467-7774d4cbaaee} + + + {abb46246-b4f9-4ad0-8db8-11b47ce43a1f} + + + {e779fbed-6102-4689-81bd-57b2e70b0f26} + + + {769e8f33-4eef-4d34-a192-6113354d584f} + + + {2775a689-9303-4568-8bdd-85793c152dc0} + + + {d58e753e-e7d1-49ea-970a-4e980b04cffa} + + + {9ec27523-fcde-48f7-8f77-34e2f2c51d3d} + + + {e7a997f1-97ef-408f-9455-132da617f439} + + + {b7fa88eb-4dd8-4476-89b3-665a128ecd49} + + + {84e54bc0-68a3-4466-b64b-147525501276} + + + {1c30324c-b033-419a-b0bc-fcd04bf5e887} + + + {5f24927a-be4e-43d4-bfa6-19a11c86ba74} + + + {b4dfd33e-325a-45e5-b5c4-bc759a765944} + + + {1adc7897-87b2-4fa2-9de1-a662bbc0cef2} + + + {8f07e318-d877-4880-834e-0e5a36759148} + + + {47260f4a-f9ab-4801-8a7f-5610755592f6} + + + {69e44658-eabe-4434-bc55-09ba8fc18a65} + + + {0a31f1b5-366b-4b0e-b998-6eee00a5e232} + + + {c2ef43b9-5a8e-4810-9430-31427c61cd57} + + + {377b23e6-4800-4305-b6de-7ffd6ab75445} + + + {3629c3cd-b691-403d-bec6-6915a63304bd} + + + {46c2c273-aa0e-4bc5-8eea-3aa512372d3a} + + + {09f711eb-3ba4-447e-85a0-b2b5ebb40328} + + + {ed4442ff-0420-424c-bbfa-720b8ab658d0} + + + {e6726a08-977a-4d22-b4b4-4e8c5aa75c80} + + + {33cb6b93-333c-4f05-bc0b-e17ac95abdf9} + + + {e74ad41e-c739-4e66-8b54-15914b651f1b} + + + {e6a2d595-06dc-436f-b5d7-57e8852f800e} + + + {5b4d4e9c-90de-496a-9897-930e48c96052} + + + {f711caa7-1c16-43ec-8f2e-92438bfdd92d} + + + {9b4e1b59-dc28-49aa-9b93-05ae39afeef4} + + + {566aad08-9d43-48ff-99a0-3f4a8e6cfa23} + + + {ebca298d-3724-42b8-923f-934f2df267de} + + + {2e9af99e-c268-459a-9615-9f3c5b58efdc} + + + {cdcb5464-cce7-4252-9fa9-0113c6f88731} + + + {6ba31aca-4ffb-4c7f-86b3-68c686e9e83a} + + + {12508884-4921-4027-9e3f-0afcc4d51b18} + + + {d28da99a-5849-465a-a1ef-a39f13b8d71b} + + + {5c9216f7-37c5-45a7-abd5-0f91ab126e78} + + + {efebb9af-0744-4d20-947b-a118679860ba} + + + {c67477ac-753e-48da-9f7c-2044d8d3561c} + + + {b96929a6-1068-4e34-ba12-9b1506c52029} + + + {2b9df357-22d4-4fd0-b797-a9bfb25a2f49} + + + {cd711175-67df-4a15-bc83-c13422334b46} + + + {2520090a-69d8-46d3-a958-de49c068035c} + + + {21031d69-8a1d-468a-98d7-2c3080705ab3} + + + {b666aa35-1920-44d0-8311-86e80b7a010a} + + + {21d16309-93ee-4b38-a10a-de87be25dcc9} + + + {939431be-589b-461b-a4dd-791ad66e9611} + + + {00ac48e4-fa60-4020-b924-18562a81d799} + + + {593b7ac7-693d-4a46-ab32-e0203004e865} + + + {6651f0d8-3685-457c-9674-91ba9c2bde9b} + + + {922ba080-bc7b-4493-b12a-2ccf5ccc3d68} + + + {7bfc1d7e-a562-4ef8-82f0-af7c5f9ec004} + + + {fff4ac28-7649-4202-85ee-4fc22b4de31b} + + + {d0b5ce80-dfff-44b8-8ca0-c01ec18c3983} + + + {8d2b7057-43b4-41e4-a752-0cfc20b1c825} + + + {1715f2ff-18ed-405a-a0b7-1bb7fc7968de} + + + {7a8dbff0-49af-4a9e-af07-7ecc643cf7d0} + + + {287c8ea7-54ab-4514-94ad-bc60fca8e2f6} + + + {f8e329a2-40aa-428b-b111-3b788023c5e0} + + + {0a443764-b762-4858-b578-114bfc5d7ab5} + + + {6fcf3801-c3e1-4097-ba82-3da0a6599555} + + + {acb13cf1-4b21-4392-826a-0ca62db8afe9} + + + {92cd288c-1327-4990-8ae2-dab11fa3a69c} + + + {bc47263f-0690-488e-b240-0b7bf763f401} + + + {5937896e-882c-429a-ada7-72c799c06920} + + + {f68e83b4-2fa3-4f47-9864-e7dfd90c16a6} + + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base\allocator + + + base\allocator + + + base\allocator + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ComAudioReader + + + cocostudio\reader\WidgetReader\GameMapReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\Node3DReader + + + cocostudio\reader\WidgetReader\NodeReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\Particle3DReader + + + cocostudio\reader\WidgetReader\ParticleReader + + + cocostudio\reader\WidgetReader\ProjectNodeReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\Sprite3DReader + + + cocostudio\reader\WidgetReader\SpriteReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader\UserCameraReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + external\ConvertUTF + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + network + + + network + + + network + + + physics + + + physics + + + physics + + + physics + + + physics + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + cocostudio\reader + + + cocostudio\reader + + + platform\winrt + + + 2d + + + 2d + + + 2d + + + external\poly2tri\common + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + network + + + network + + + base + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + base + + + base + + + audioengine + + + audioengine + + + audioengine + + + audioengine + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + + + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 2d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + 3d + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + base\allocator + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosbuilder + + + cocosdenshion\include + + + cocosdenshion\include + + + cocosdenshion\include + + + cocosdenshion\winrt + + + cocosdenshion\winrt + + + cocostudio + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\action + + + cocostudio\armature + + + cocostudio\armature + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\animation + + + cocostudio\armature\datas + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\display + + + cocostudio\armature\physics + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\armature\utils + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\components + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\json\flatbuffers + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\trigger + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\TimelineAction + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ArmatureNodeReader + + + cocostudio\reader\WidgetReader\ButtonReader + + + cocostudio\reader\WidgetReader\CheckBoxReader + + + cocostudio\reader\WidgetReader\ComAudioReader + + + cocostudio\reader\WidgetReader\GameMapReader + + + cocostudio\reader\WidgetReader\ImageViewReader + + + cocostudio\reader\WidgetReader\LayoutReader + + + cocostudio\reader\WidgetReader\ListViewReader + + + cocostudio\reader\WidgetReader\LoadingBarReader + + + cocostudio\reader\WidgetReader\Node3DReader + + + cocostudio\reader\WidgetReader\NodeReader + + + cocostudio\reader\WidgetReader\PageViewReader + + + cocostudio\reader\WidgetReader\Particle3DReader + + + cocostudio\reader\WidgetReader\ParticleReader + + + cocostudio\reader\WidgetReader\ProjectNodeReader + + + cocostudio\reader\WidgetReader\ScrollViewReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\SliderReader + + + cocostudio\reader\WidgetReader\Sprite3DReader + + + cocostudio\reader\WidgetReader\SpriteReader + + + cocostudio\reader\WidgetReader\TextAtlasReader + + + cocostudio\reader\WidgetReader\TextBMFontReader + + + cocostudio\reader\WidgetReader\TextFieldReader + + + cocostudio\reader\WidgetReader\TextReader + + + cocostudio\reader\WidgetReader\UserCameraReader + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + deprecated + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCControlExtensions + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\GUI\CCScrollView + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\Particle3D\PU + + + extension\physics_nodes + + + extension\physics_nodes + + + extension + + + extension + + + extension + + + extension + + + external\ConvertUTF + + + external\edtaa + + + external\xxhash + + + external\unzip + + + external\unzip + + + external\unzip + + + external\unzip + + + external\tinyxml2 + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + network + + + network + + + network + + + network + + + network + + + network + + + physics + + + physics + + + physics + + + physics + + + physics + + + physics + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + platform\winrt + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + storage + + + ui\BaseClasses + + + ui\BaseClasses + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\Layouts + + + ui\System + + + ui\System + + + ui\System + + + ui\System + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\EditBox + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets\ScrollWidget + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + ui\UIWidgets + + + cocostudio\reader + + + cocostudio\reader + + + platform\winrt + + + 2d + + + 2d + + + 2d + + + external\poly2tri + + + external\poly2tri\common + + + external\poly2tri\common + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + external\poly2tri\sweep + + + network + + + base + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + base + + + audioengine + + + audioengine + + + audioengine + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + physics3d + + + + + base + + + base + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + math + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + + renderer + + + renderer + + + renderer + + + renderer + + + renderer + + + + + renderer + + + \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10.props b/cocos/2d/win10_props/cocos2d_win10.props new file mode 100644 index 0000000000..b5bfaeca85 --- /dev/null +++ b/cocos/2d/win10_props/cocos2d_win10.props @@ -0,0 +1,32 @@ + + + + + $(MSBuildThisFileDirectory)..\..\..\ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM)\freetype2;$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories) + + + WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;RAPIDJSON_ENDIAN=RAPIDJSON_LITTLEENDIAN;%(PreprocessorDefinitions) + true + true + false + OldStyle + 4056;4244;4251;4756;4453;28204;4099; + + + libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;chipmunk.lib;zlib.lib;freetype.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalLibraryDirectories); + /IGNORE:4264 %(AdditionalOptions) + + + + + $(EngineRoot) + true + + + \ No newline at end of file diff --git a/cocos/2d/win10_props/cocos2d_win10_app.props b/cocos/2d/win10_props/cocos2d_win10_app.props new file mode 100644 index 0000000000..9d5ace9ee9 --- /dev/null +++ b/cocos/2d/win10_props/cocos2d_win10_app.props @@ -0,0 +1,27 @@ + + + + + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\angle\prebuilt\$(Platform)\ + $(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform)\ + $(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform)\ + $(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform)\ + + + + true + + + true + + + true + + + true + + + true + + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_platform.props b/cocos/2d/win10_props/cocos2d_win10_platform.props similarity index 59% rename from cocos/2d/winrt_props/cocos2d_winrt_platform.props rename to cocos/2d/win10_props/cocos2d_win10_platform.props index 761976bf4e..14747a896d 100644 --- a/cocos/2d/winrt_props/cocos2d_winrt_platform.props +++ b/cocos/2d/win10_props/cocos2d_win10_platform.props @@ -2,6 +2,11 @@ - winrt_8.1 + win10 + + + msxml6.lib;%(AdditionalDependencies) + + \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt.props b/cocos/2d/winrt_props/cocos2d_winrt.props deleted file mode 100644 index a35aa77534..0000000000 --- a/cocos/2d/winrt_props/cocos2d_winrt.props +++ /dev/null @@ -1,32 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\..\..\ - - - - - $(EngineRoot)external\winrt-specific\angle\include;$(EngineRoot)external\freetype2\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\curl\include\$(COCOS2D_PLATFORM);$(EngineRoot)external\websockets\include\$(COCOS2D_PLATFORM);$(EngineRoot)cocos\platform\winrt;$(EngineRoot)cocos\platform;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\sqlite3\include;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos;$(EngineRoot)extensions;$(EngineRoot)external;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\unzip;$(EngineRoot)external\tinyxml2;$(EngineRoot);$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\xxhash;$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalIncludeDirectories); - - - WINRT;_VARIADIC_MAX=10;NOMINMAX;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_UNICODE;UNICODE;%(PreprocessorDefinitions) - true - true - false - OldStyle - 4056;4996;4244;4251; - - - libGLESv2.lib;libEGL.lib;ws2_32.lib;libwebsockets.lib;libcurl.lib;libchipmunk.lib;zlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;freetype250.lib;sqlite3.lib;d2d1.lib;d3d11.lib;dxgi.lib;windowscodecs.lib;dwrite.lib;dxguid.lib;xaudio2.lib;mfcore.lib;mfplat.lib;mfreadwrite.lib;mfuuid.lib;%(AdditionalDependencies) - $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform);$(EngineRoot)external\curl\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\websockets\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\chipmunk\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\$(COCOS2D_PLATFORM)-specific\zlib\prebuilt\$(Platform);$(EngineRoot)external\png\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\tiff\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\jpeg\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\sqlite3\libraries\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\freetype2\prebuilt\$(COCOS2D_PLATFORM)\$(Platform);$(EngineRoot)external\poly2tri;$(EngineRoot)external\poly2tri\common;$(EngineRoot)external\poly2tri\sweep;%(AdditionalLibraryDirectories); - /IGNORE:4264 %(AdditionalOptions) - - - - - $(EngineRoot) - true - - - \ No newline at end of file diff --git a/cocos/2d/winrt_props/cocos2d_winrt_app.props b/cocos/2d/winrt_props/cocos2d_winrt_app.props deleted file mode 100644 index d0685779c1..0000000000 --- a/cocos/2d/winrt_props/cocos2d_winrt_app.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - $(EngineRoot)external\winrt-specific\angle\prebuilt\$(Platform)\ - - - - true - - - true - - - \ No newline at end of file diff --git a/cocos/editor-support/spine/proj.win10/libSpine.vcxproj b/cocos/editor-support/spine/proj.win10/libSpine.vcxproj new file mode 100644 index 0000000000..0cc0b2ecf4 --- /dev/null +++ b/cocos/editor-support/spine/proj.win10/libSpine.vcxproj @@ -0,0 +1,489 @@ + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + false + false + false + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + StaticLibrary + libSpine + libSpine + en-US + 14.0 + true + Windows Store + 8.2 + + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + StaticLibrary + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + false + + + false + + + false + + + false + + + false + + + false + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + ProgramDatabase + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + ProgramDatabase + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + /IGNORE:4264 %(AdditionalOptions) + + + + + NotUsing + true + false + false + 4458;4456;4996;%(DisableSpecificWarnings) + $(EngineRoot)external\win10-specific\angle\include;%(AdditionalIncludeDirectories) + + + Console + false + false + + + false + /IGNORE:4264 %(AdditionalOptions) + + + + + + \ No newline at end of file diff --git a/cocos/network/HttpClient-winrt.cpp b/cocos/network/HttpClient-winrt.cpp new file mode 100644 index 0000000000..83949dc7d9 --- /dev/null +++ b/cocos/network/HttpClient-winrt.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-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 "HttpClient.h" + +#include +#include +#include + +#include + +#include "base/CCVector.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" + +#include "platform/CCFileUtils.h" +#include "HttpConnection-winrt.h" + +NS_CC_BEGIN + +namespace network { + + static std::mutex s_requestQueueMutex; + static std::mutex s_responseQueueMutex; + + static std::condition_variable_any s_SleepCondition; + + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + typedef int int32_t; +#endif + + static Vector* s_requestQueue = nullptr; + static Vector* s_responseQueue = nullptr; + + static HttpClient *s_pHttpClient = nullptr; // pointer to singleton + + static std::string s_errorBuffer =""; + + static std::string s_cookieFilename = ""; + + static std::string s_sslCaFilename = ""; + + // function used to collect response/header data + static void writeData(std::vector *pFromBuffer, std::vector *pToBuffer) + { + if(nullptr == pFromBuffer || nullptr == pToBuffer) + return; + + pToBuffer->insert(pToBuffer->end(), pFromBuffer->begin(), pFromBuffer->end()); + } + + static void processHttpResponse(HttpResponse* response, std::string& errorStr); + + static HttpRequest *s_requestSentinel = new HttpRequest; + + // Worker thread + void HttpClient::networkThread() + { + auto scheduler = Director::getInstance()->getScheduler(); + + while (true) + { + HttpRequest *request; + + // step 1: send http request if the requestQueue isn't empty + { + std::lock_guard lock(s_requestQueueMutex); + while (s_requestQueue->empty()) { + s_SleepCondition.wait(s_requestQueueMutex); + } + request = s_requestQueue->at(0); + s_requestQueue->erase(0); + } + + if (request == s_requestSentinel) { + break; + } + + // step 2: libcurl sync access + + // Create a HttpResponse object, the default setting is http access failed + HttpResponse *response = new (std::nothrow) HttpResponse(request); + + processHttpResponse(response, s_errorBuffer); + + + // add response packet into queue + s_responseQueueMutex.lock(); + s_responseQueue->pushBack(response); + s_responseQueueMutex.unlock(); + + if (nullptr != s_pHttpClient) { + scheduler->performFunctionInCocosThread(CC_CALLBACK_0(HttpClient::dispatchResponseCallbacks, this)); + } + } + + // cleanup: if worker thread received quit signal, clean up un-completed request queue + s_requestQueueMutex.lock(); + s_requestQueue->clear(); + s_requestQueueMutex.unlock(); + + + if (s_requestQueue != nullptr) { + delete s_requestQueue; + s_requestQueue = nullptr; + delete s_responseQueue; + s_responseQueue = nullptr; + } + + } + + // Worker thread + void HttpClient::networkThreadAlone(HttpRequest* request, HttpResponse* response) + { + std::string errorStr; + processHttpResponse(response, errorStr); + + auto scheduler = Director::getInstance()->getScheduler(); + scheduler->performFunctionInCocosThread([response, request]{ + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); + + if (callback != nullptr) + { + callback(s_pHttpClient, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(s_pHttpClient, response); + } + response->release(); + // do not release in other thread + request->release(); + }); + } + + // Process Response + static void processHttpResponse(HttpResponse* response, std::string& errorStr) + { + auto request = response->getHttpRequest(); + long responseCode = -1; + int retValue = 0; + HttpConnection xhr; + bool ok = false; + bool manualAuthReqd = false; + + // Process the request -> get response packet + switch (request->getRequestType()) + { + case HttpRequest::Type::GET: // HTTP GET + ok = (xhr.init(request) && xhr.open("GET", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::POST: // HTTP POST + ok = (xhr.init(request) && xhr.open("POST", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::PUT: // HTTP PUT + ok = (xhr.init(request) && xhr.open("PUT", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + case HttpRequest::Type::DELETE: // HTTP DELETE + ok = (xhr.init(request) && xhr.open("DELETE", manualAuthReqd, s_cookieFilename) && xhr.send()); + break; + + default: + CCASSERT(true, "CCHttpClient: unknown request type, only GET and POST are supported"); + break; + } + + writeData(xhr.getResponseHeader(), response->getResponseHeader()); + writeData(xhr.getResponseData(), response->getResponseData()); + retValue = ok ? 0 : 1; + errorStr = xhr.getErrorMessage(); + responseCode = xhr.getStatusCode(); + + // write data to HttpResponse + response->setResponseCode(responseCode); + + if (retValue != 0) + { + response->setSucceed(false); + response->setErrorBuffer(errorStr.c_str()); + } + else + { + response->setSucceed(true); + } + } + + // HttpClient implementation + HttpClient* HttpClient::getInstance() + { + if (s_pHttpClient == nullptr) { + s_pHttpClient = new (std::nothrow) HttpClient(); + } + + return s_pHttpClient; + } + + void HttpClient::destroyInstance() + { + CC_SAFE_DELETE(s_pHttpClient); + } + + void HttpClient::enableCookies(const char* cookieFile) { + if (cookieFile) { + s_cookieFilename = std::string(cookieFile); + } + else { + s_cookieFilename = (FileUtils::getInstance()->getWritablePath() + "cookieFile.txt"); + } + } + + void HttpClient::setSSLVerification(const std::string& caFile) + { + s_sslCaFilename = caFile; + } + + HttpClient::HttpClient() + : _timeoutForConnect(30) + , _timeoutForRead(60) + { + } + + HttpClient::~HttpClient() + { + if (s_requestQueue != nullptr) { + { + std::lock_guard lock(s_requestQueueMutex); + s_requestQueue->pushBack(s_requestSentinel); + } + s_SleepCondition.notify_one(); + } + + s_pHttpClient = nullptr; + } + + //Lazy create semaphore & mutex & thread + bool HttpClient::lazyInitThreadSemphore() + { + if (s_requestQueue != nullptr) { + return true; + } + else { + + s_requestQueue = new (std::nothrow) Vector(); + s_responseQueue = new (std::nothrow) Vector(); + + auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this)); + t.detach(); + } + + return true; + } + + //Add a get task to queue + void HttpClient::send(HttpRequest* request) + { + if (false == lazyInitThreadSemphore()) + { + return; + } + + if (!request) + { + return; + } + + request->retain(); + + if (nullptr != s_requestQueue) { + s_requestQueueMutex.lock(); + s_requestQueue->pushBack(request); + s_requestQueueMutex.unlock(); + + // Notify thread start to work + s_SleepCondition.notify_one(); + } + } + + void HttpClient::sendImmediate(HttpRequest* request) + { + if (!request) + { + return; + } + + request->retain(); + // Create a HttpResponse object, the default setting is http access failed + HttpResponse *response = new (std::nothrow) HttpResponse(request); + + auto t = std::thread(&HttpClient::networkThreadAlone, this, request, response); + t.detach(); + } + + // Poll and notify main thread if responses exists in queue + void HttpClient::dispatchResponseCallbacks() + { + // log("CCHttpClient::dispatchResponseCallbacks is running"); + //occurs when cocos thread fires but the network thread has already quited + if (nullptr == s_responseQueue) { + return; + } + HttpResponse* response = nullptr; + + s_responseQueueMutex.lock(); + + if (!s_responseQueue->empty()) + { + response = s_responseQueue->at(0); + s_responseQueue->erase(0); + } + + s_responseQueueMutex.unlock(); + + if (response) + { + HttpRequest *request = response->getHttpRequest(); + const ccHttpRequestCallback& callback = request->getCallback(); + Ref* pTarget = request->getTarget(); + SEL_HttpResponse pSelector = request->getSelector(); + + if (callback != nullptr) + { + callback(this, response); + } + else if (pTarget && pSelector) + { + (pTarget->*pSelector)(this, response); + } + + response->release(); + // do not release in other thread + request->release(); + } + } + + } + +NS_CC_END diff --git a/cocos/network/HttpConnection-winrt.cpp b/cocos/network/HttpConnection-winrt.cpp new file mode 100644 index 0000000000..d44901197c --- /dev/null +++ b/cocos/network/HttpConnection-winrt.cpp @@ -0,0 +1,741 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-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 "network/HttpCookie.h" +#include "HttpConnection-winrt.h" + +NS_CC_BEGIN + +namespace network { + + // Format and add default headers (Platform specific approach) + static void formatHeaders(std::vector& headers) + { +#if defined(_XBOX_ONE) + for(auto iter = headers.begin(); iter != headers.end(); ++iter) + { + (*iter) += "\r\n"; + } + + // append default headers + headers.emplace_back("User-Agent: XB1_IXHR2_HTTP\r\n"); + headers.emplace_back("x-xbl-device-type: XboxOne\r\n"); + headers.emplace_back("x-xbl-client-type: Console\r\n"); + headers.emplace_back("x-xbl-client-version: 1.0\r\n"); + headers.emplace_back("x-xbl-contract-version: 1\r\n"); +#endif + } + + // Get user authentication token (Platform specific approach) + static bool getAuthenticationToken(std::string verb, std::string url, std::string headersXST, std::string bodyXST, std::string& token, std::string& signature) + { +#if defined(_XBOX_ONE) + using namespace Windows::Xbox::System; + + token = ""; + signature = ""; + User^ loggedInUser = nullptr; + int ind = 0; + + while(ind < User::Users->Size) + { + loggedInUser = User::Users->GetAt(ind++); + if(loggedInUser->IsSignedIn) + break; + + loggedInUser = nullptr; + } + + if(nullptr == loggedInUser) + return false; + + Platform::Array^ body; + + if(!bodyXST.empty()) { + body = ref new Platform::Array((unsigned char*)bodyXST.c_str(), bodyXST.size()); + } + else { + body = ref new Platform::Array(1); + body[0] = 0; + } + + // this method will crash if TitleId & PrimaryServiceConfigId not specified in Package.appxmanifest. + auto asynOp = loggedInUser->GetTokenAndSignatureAsync( + ref new Platform::String(std::wstring(verb.begin(), verb.end()).c_str()), + ref new Platform::String(std::wstring(url.begin(), url.end()).c_str()), + ref new Platform::String(std::wstring(headersXST.begin(), headersXST.end()).c_str()), body); + + bool bRet = false; + HRESULT hr = S_OK; + + asynOp->Completed = ref new Windows::Foundation::AsyncOperationCompletedHandler( + [&token, &signature, &bRet, &hr](Windows::Foundation::IAsyncOperation^ operation, Windows::Foundation::AsyncStatus status) + { + if(status == Windows::Foundation::AsyncStatus::Completed) { + try + { + auto result = operation->GetResults(); + + std::wstring tok = result->Token->Data(); + std::wstring sig = result->Signature->Data(); + token = std::string(tok.begin(), tok.end()); + signature = std::string(sig.begin(), sig.end()); + + bRet = true; + } + catch(Platform::Exception^ e) + { + bRet = false; + } + } + else { + hr = operation->ErrorCode.Value; + + if(hr == 0x87dd0021) //AM_E_NO_TOKEN_REQUIRED + bRet = true; + } + }); + + while(asynOp->Status == Windows::Foundation::AsyncStatus::Started) + { + ::Sleep(1); + } + + return bRet; +#else + return false; +#endif + } + + + // CXMLHTTPRequest2Callback + CXHR2Callback::CXHR2Callback() : + _statusCode(0), + _hWfC(nullptr), + _errorMsg("") + { + } + + CXHR2Callback::~CXHR2Callback() + { + if (nullptr != _hWfC) + { + CloseHandle(_hWfC); + _hWfC = nullptr; + } + } + + HRESULT CXHR2Callback::RuntimeClassInitialize() + { + _hWfC = CreateEventEx(nullptr, nullptr, CREATE_EVENT_MANUAL_RESET, EVENT_ALL_ACCESS); + return HRESULT_FROM_WIN32(GetLastError()); + } + + HRESULT CXHR2Callback::OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl) + { + UNREFERENCED_PARAMETER(pXHR); + UNREFERENCED_PARAMETER(pwszRedirectUrl); + + return S_OK; + } + + HRESULT CXHR2Callback::OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus) + { + _statusCode = dwStatus; + + if(nullptr == pXHR) { + return E_INVALIDARG; + } + + WCHAR *headers = nullptr; + HRESULT hr = pXHR->GetAllResponseHeaders(&headers); + + if(SUCCEEDED(hr)) { + std::wstring hdr = headers; + _headers.insert(_headers.end(), hdr.begin(), hdr.end()); + } + + if(headers != nullptr) { + CoTaskMemFree(headers); + headers = nullptr; + } + + return hr; + } + + HRESULT CXHR2Callback::OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) + { + UNREFERENCED_PARAMETER(pXHR); + + return ReadStreamData(pResponseStream); + } + + HRESULT CXHR2Callback::OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream) + { + UNREFERENCED_PARAMETER(pXHR); + + HRESULT hr = ReadStreamData(pResponseStream); + + CompleteRequest(hr); + + return hr; + } + + HRESULT CXHR2Callback::OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError) + { + CompleteRequest(hrError); + + return hrError; + } + + HRESULT CXHR2Callback::WaitForComplete(PDWORD pdwStatus) + { + HRESULT hr = E_FAIL; + + if (NULL != _hWfC) + { + hr = S_OK; + DWORD error; + + error = WaitForSingleObjectEx(_hWfC, INFINITE, FALSE); + + if (error == WAIT_FAILED) { + hr = HRESULT_FROM_WIN32(GetLastError()); + } + + if (error != WAIT_OBJECT_0) { + hr = E_ABORT; + } + } + + if (SUCCEEDED(hr)) { + *pdwStatus = _statusCode; + } + + return hr; + } + + HRESULT CXHR2Callback::ReadStreamData(ISequentialStream* pResponseStream) + { + if(pResponseStream == NULL) { + return E_INVALIDARG; + } + + CCHAR buff[READ_BUFFER_MAX]; + DWORD totalBytes = 0; + DWORD bytesRead = 0; + HRESULT hr = S_OK; + + do + { + hr = pResponseStream->Read(buff, READ_BUFFER_MAX, &bytesRead); + + if(FAILED(hr)) { + break; + } + + _data.insert(_data.end(), &buff[0], buff + bytesRead); + totalBytes += bytesRead; + } + while(hr == S_OK); + + if(SUCCEEDED(hr)) { + hr = S_OK; + } + + return hr; + } + + void CXHR2Callback::CompleteRequest(HRESULT hrError) + { + if (NULL != _hWfC) { + SetEvent(_hWfC); + } + + switch (hrError) + { + case S_OK: + case S_FALSE: + _statusCode = 200; + break; + + case INET_E_AUTHENTICATION_REQUIRED: + _statusCode = 401; + _errorMsg = ERR_MSG_401; + break; + + case INET_E_DOWNLOAD_FAILURE: + _statusCode = 500; + _errorMsg = ERR_MSG_DL_FLD; + break; + + case INET_E_FORBIDFRAMING: + _statusCode = 403; + _errorMsg = ERR_MSG_403; + break; + + case INET_E_RESOURCE_NOT_FOUND: + _statusCode = 404; + _errorMsg = ERR_MSG_404; + break; + + case RPC_S_PROXY_ACCESS_DENIED: + _statusCode = 407; + _errorMsg = ERR_MSG_407; + break; + + case ERROR_RESOURCE_CALL_TIMED_OUT: + _statusCode = 408; + _errorMsg = ERR_MSG_408; + break; + + case INET_E_INVALID_REQUEST: + _statusCode = 400; + _errorMsg = ERR_MSG_400; + break; + + case E_ABORT: + _statusCode = 412; + _errorMsg = ERR_MSG_412; + break; + + default: + _statusCode = 500; + _errorMsg = ERR_MSG_500; + break; + } + } + + + //CXHR2DataStream + CXHR2DataStream::CXHR2DataStream() : + _pData(nullptr), + _dataSize(0), + _seekIndex(0), + _refCnt(1) + { + } + + CXHR2DataStream::~CXHR2DataStream() + { + if(nullptr != _pData) + delete[] _pData; + } + + ULONG CXHR2DataStream::Length() + { + return _dataSize; + } + + HRESULT CXHR2DataStream::Init(const void *psBuffer, ULONG cbBufferSize) + { + HRESULT hr = S_OK; + + if(psBuffer == nullptr || cbBufferSize > REQUEST_BUFFER_MAX) { + hr = E_INVALIDARG; + } + + if(SUCCEEDED(hr)) { + _dataSize = cbBufferSize; + _seekIndex = 0; + _pData = new (std::nothrow) BYTE[_dataSize]; + + if(_pData == nullptr) + hr = E_OUTOFMEMORY; + } + + if(SUCCEEDED(hr)) { + memcpy_s(_pData, _dataSize, psBuffer, cbBufferSize); + } + + return hr; + } + + HRESULT CXHR2DataStream::Read(void *pv, ULONG cb, ULONG *pcbRead) + { + HRESULT hr = S_OK; + + if(pv == nullptr) { + hr = E_INVALIDARG; + } + + if(SUCCEEDED(hr)) { + BYTE* pOutput = (BYTE*)pv; + BYTE* _pInput = _pData; + + for(*pcbRead = 0; *pcbRead < cb; (*pcbRead)++) + { + if(_seekIndex == _dataSize) { + hr = S_FALSE; + break; + } + + pOutput[*pcbRead] = _pInput[*pcbRead]; + _seekIndex++; + } + } + + return hr; + } + + HRESULT CXHR2DataStream::Write(const void *pv, ULONG cb, ULONG *pcbWritten) + { + HRESULT hr = E_NOTIMPL; + + UNREFERENCED_PARAMETER(pv); + UNREFERENCED_PARAMETER(cb); + UNREFERENCED_PARAMETER(pcbWritten); + + return hr; + } + + ULONG CXHR2DataStream::AddRef() + { + return ::InterlockedIncrement(&_refCnt); + } + + ULONG CXHR2DataStream::Release() + { + ULONG refCnt = ::InterlockedDecrement(&_refCnt); + + if(0 == refCnt) { + delete this; + } + + return refCnt; + } + + HRESULT CXHR2DataStream::QueryInterface(REFIID riid, void **ppvObject) + { + HRESULT hr = S_OK; + + if(ppvObject == nullptr) { + hr = E_INVALIDARG; + } + + void *pObject = nullptr; + + if(SUCCEEDED(hr)) { + + if(riid == IID_IUnknown) { + pObject = static_cast((IDispatch*)this); + } + else if(riid == IID_IDispatch) { + pObject = static_cast(this); + } + else if(riid == IID_ISequentialStream) { + pObject = static_cast(this); + } + else { + hr = E_NOINTERFACE; + } + } + + if(SUCCEEDED(hr)) { + AddRef(); + *ppvObject = pObject; + pObject = nullptr; + } + + return hr; + } + + HRESULT CXHR2DataStream::GetTypeInfoCount(unsigned int FAR* pctinfo) + { + HRESULT hr = E_NOTIMPL; + + if(pctinfo) + *pctinfo = 0; + + return hr; + } + + HRESULT CXHR2DataStream::GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo) + { + HRESULT hr = E_NOTIMPL; + + if(ppTInfo) + *ppTInfo = 0; + + UNREFERENCED_PARAMETER(iTInfo); + UNREFERENCED_PARAMETER(lcid); + + return hr; + } + + HRESULT CXHR2DataStream::GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId) + { + HRESULT hr = DISP_E_UNKNOWNNAME; + + UNREFERENCED_PARAMETER(riid); + UNREFERENCED_PARAMETER(rgszNames); + UNREFERENCED_PARAMETER(cNames); + UNREFERENCED_PARAMETER(lcid); + UNREFERENCED_PARAMETER(rgDispId); + + return hr; + } + + HRESULT CXHR2DataStream::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr) + { + HRESULT hr = S_OK; + + UNREFERENCED_PARAMETER(dispIdMember); + UNREFERENCED_PARAMETER(riid); + UNREFERENCED_PARAMETER(lcid); + UNREFERENCED_PARAMETER(wFlags); + UNREFERENCED_PARAMETER(pDispParams); + UNREFERENCED_PARAMETER(pVarResult); + UNREFERENCED_PARAMETER(pExcepInfo); + UNREFERENCED_PARAMETER(puArgErr); + + return hr; + } + + + // HttpConnection + HttpConnection::HttpConnection() : + _isInitialized(false), + _spXhr(nullptr), + _spXhrCallback(nullptr), + _spXhrRequestData(nullptr), + _pRequest(nullptr), + _timeOutInMs(0) + { + } + + HttpConnection::~HttpConnection() + { + } + + bool HttpConnection::init(HttpRequest *pRequest, DWORD timeOutInMs) + { + if (_isInitialized || nullptr == pRequest) { + return _isInitialized; + } + + HRESULT hr = CoInitializeEx(NULL, NULL); + + if (SUCCEEDED(hr)) { + hr = CoCreateInstance(CLSID_FreeThreadedXMLHTTP60, NULL, CLSCTX_SERVER, IID_PPV_ARGS(&_spXhr)); + } + + if (SUCCEEDED(hr)) { + hr = MakeAndInitialize(&_spXhrCallback); + } + + if(SUCCEEDED(hr)) { + _pRequest = pRequest; + _timeOutInMs = timeOutInMs; + + LONG size = _pRequest->getRequestDataSize(); + + if(size > 0) { + _spXhrRequestData = Make(); + hr = _spXhrRequestData->Init(_pRequest->getRequestData(), size); + } + } + + return _isInitialized = SUCCEEDED(hr); + } + + bool HttpConnection::open(std::string verb) + { + return open(verb, false, ""); + } + + bool HttpConnection::open(std::string verb, bool userAuthentication) + { + return open(verb, userAuthentication, ""); + } + + bool HttpConnection::open(std::string verb, std::string cookieFile) + { + return open(verb, false, cookieFile); + } + + bool HttpConnection::open(std::string verb, bool userAuthentication, std::string cookieFile) + { + if (!_isInitialized) { + return false; + } + + std::wstring method(verb.begin(), verb.end()); + std::string url(_pRequest->getUrl()); + std::wstring wUrl(url.begin(), url.end()); + HRESULT hr = _spXhr->Open(method.c_str(), wUrl.c_str(), _spXhrCallback.Get(), NULL, NULL, NULL, NULL); + + if(SUCCEEDED(hr) && _timeOutInMs != 0) { + hr = _spXhr->SetProperty(XHR_PROP_TIMEOUT, _timeOutInMs); + } + +#if 0 + if(SUCCEEDED(hr)) { + hr = _spXhr->SetProperty(XHR_PROP_ONDATA_THRESHOLD, READ_BUFFER_MAX); + } +#endif + + auto headers = _pRequest->getHeaders(); + formatHeaders(headers); + + for(auto header : headers) + { + std::string key = header.substr(0, header.find_first_of(':')); + std::string value = header.substr(header.find_first_of(':') + 1, header.size() - 1); + if(SUCCEEDED(hr)) { + hr = _spXhr->SetRequestHeader(std::wstring(key.begin(), key.end()).c_str(), std::wstring(value.begin(), value.end()).c_str()); + } + } + + if(SUCCEEDED(hr) && userAuthentication) { + std::string authHeaders = std::accumulate(headers.begin(), headers.end(), std::string("")); + hr = authenticateUser(verb, url, authHeaders); + } + + if(SUCCEEDED(hr) && !cookieFile.empty()) { + hr = processCookieFile(url, cookieFile); + } + + if(FAILED(hr)) { + cancelRequest(hr); + } + + return SUCCEEDED(hr); + } + + HRESULT HttpConnection::authenticateUser(std::string& verb, std::string& url, std::string& headers) + { + HRESULT hr = S_OK; + std::string authToken; + std::string authSig; + std::string authBody; + + if(_pRequest->getRequestDataSize() > 0) + authBody = _pRequest->getRequestData(); + + if(getAuthenticationToken(verb, url, headers, authBody, authToken, authSig)) { + hr = _spXhr->SetRequestHeader(L"Authorization", std::wstring(authToken.begin(), authToken.end()).c_str()); + + if(SUCCEEDED(hr)) { + hr = _spXhr->SetRequestHeader(L"Signature", std::wstring(authSig.begin(), authSig.end()).c_str()); + } + } + else + { + hr = INET_E_AUTHENTICATION_REQUIRED; + } + + return hr; + } + + HRESULT HttpConnection::processCookieFile(std::string& url, std::string& cookieFile) + { + HRESULT hr = S_OK; + + HttpCookie cookie; + cookie.setCookieFileName(cookieFile); + auto cookies = cookie.getCookies(); + std::string cookieInfo = ""; + int cCnt = 0; + + for(auto iter = cookies->begin(); iter != cookies->end(); iter++) + { + if(url.find(iter->domain) != std::string::npos) + { + std::string keyVal = iter->name; + keyVal.append("="); + keyVal.append(iter->value); + if(cCnt != 0) { + cookieInfo.append(";"); + } + cookieInfo.append(keyVal); + cCnt++; + } + } + + if(!cookieInfo.empty() && nullptr != _spXhr) { + hr = _spXhr->SetRequestHeader(L"Cookie", std::wstring(cookieInfo.begin(), cookieInfo.end()).c_str()); + } + + return hr; + } + + bool HttpConnection::send() + { + if (!_isInitialized) { + return false; + } + + HRESULT hr = E_FAIL; + + if(nullptr == _spXhrRequestData) { + hr = _spXhr->Send(NULL, 0); + } + else { + hr = _spXhr->Send(_spXhrRequestData.Get(), _spXhrRequestData->Length()); + } + + if(SUCCEEDED(hr)) { + DWORD status = 0; + hr = _spXhrCallback->WaitForComplete(&status); + } + else { + cancelRequest(hr); + } + + return SUCCEEDED(hr); + } + + DWORD HttpConnection::getStatusCode() + { + return _spXhrCallback != nullptr ? _spXhrCallback->_statusCode : 500; + } + + std::string HttpConnection::getErrorMessage() + { + return _spXhrCallback != nullptr ? _spXhrCallback->_errorMsg : ERR_MSG_500; + } + + std::vector* HttpConnection::getResponseHeader() + { + return _spXhrCallback != nullptr ? &_spXhrCallback->_headers : nullptr; + } + + std::vector* HttpConnection::getResponseData() + { + return _spXhrCallback != nullptr ? &_spXhrCallback->_data : nullptr; + } + + void HttpConnection::cancelRequest(HRESULT hrError) + { + if(nullptr != _spXhr) { + _spXhr->Abort(); + _spXhrCallback->CompleteRequest(hrError); + } + } +} + +NS_CC_END diff --git a/cocos/network/HttpConnection-winrt.h b/cocos/network/HttpConnection-winrt.h new file mode 100644 index 0000000000..db757fe424 --- /dev/null +++ b/cocos/network/HttpConnection-winrt.h @@ -0,0 +1,157 @@ +/**************************************************************************** +Copyright (c) 2012 greathqy +Copyright (c) 2012 cocos2d-x.org +Copyright (c) 2013-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 "network/HttpRequest.h" +#include "network/HttpClient.h" + +#include +#include +#include +#include + +#include + +#include +#if defined(_XBOX_ONE) +#include +#else +#include +#endif +using namespace Microsoft::WRL; +using namespace Microsoft::WRL::Details; + +#include "base/CCVector.h" +#include "base/CCDirector.h" +#include "base/CCScheduler.h" + +#include "platform/CCFileUtils.h" + +NS_CC_BEGIN + +namespace network { + + const int READ_BUFFER_MAX = 16 * 1024; + const int REQUEST_BUFFER_MAX = 4 * 1024 * 1024; + + const char ERR_MSG_500[] = "Internal server error"; + const char ERR_MSG_400[] = "Invalid request"; + const char ERR_MSG_401[] = "Authentication is required to access this resource"; + const char ERR_MSG_403[] = "Forbidden"; + const char ERR_MSG_404[] = "Specified resource could not be found"; + const char ERR_MSG_407[] = "Proxy authentication failed"; + const char ERR_MSG_408[] = "Request timed out"; + const char ERR_MSG_412[] = "Request aborted"; + const char ERR_MSG_DL_FLD[] = "The download of the specified resource has failed"; + + class CXHR2Callback : public Microsoft::WRL::RuntimeClass, IXMLHTTPRequest2Callback> + { + public: + CXHR2Callback(); + ~CXHR2Callback(); + + HRESULT RuntimeClassInitialize(); + HRESULT ReadStreamData(ISequentialStream* pResponseStream); + STDMETHODIMP OnRedirect(IXMLHTTPRequest2 *pXHR, const WCHAR *pwszRedirectUrl); + STDMETHODIMP OnHeadersAvailable(IXMLHTTPRequest2 *pXHR, DWORD dwStatus, const WCHAR *pwszStatus); + STDMETHODIMP OnDataAvailable(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); + STDMETHODIMP OnResponseReceived(IXMLHTTPRequest2 *pXHR, ISequentialStream *pResponseStream); + STDMETHODIMP OnError(IXMLHTTPRequest2 *pXHR, HRESULT hrError); + STDMETHODIMP WaitForComplete(PDWORD pdwStatus); + + protected: + void CompleteRequest(HRESULT hrError); + + private: + HANDLE _hWfC; + DWORD _statusCode; + std::string _errorMsg; + std::vector _headers; + std::vector _data; + + friend class HttpConnection; + }; + + class CXHR2DataStream : public Microsoft::WRL::RuntimeClass, ISequentialStream, IDispatch> + { + public: + CXHR2DataStream(); + ~CXHR2DataStream(); + + STDMETHODIMP_(ULONG) Length(); + STDMETHODIMP Init(const void *psBuffer, ULONG cbBufferSize); + + STDMETHODIMP Read(void *pv, ULONG cb, ULONG *pcbRead); + STDMETHODIMP Write(const void *pv, ULONG cb, ULONG *pcbWritten); + + STDMETHODIMP_(ULONG) AddRef(); + STDMETHODIMP_(ULONG) Release(); + STDMETHODIMP QueryInterface(REFIID riid, void **ppvObject); + + STDMETHODIMP GetTypeInfoCount(unsigned int FAR* pctinfo); + STDMETHODIMP GetTypeInfo(unsigned int iTInfo, LCID lcid, ITypeInfo FAR* FAR* ppTInfo); + STDMETHODIMP GetIDsOfNames(REFIID riid, OLECHAR FAR* FAR* rgszNames, unsigned int cNames, LCID lcid, DISPID FAR* rgDispId); + STDMETHODIMP Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, unsigned int FAR* puArgErr); + + private: + ULONG _refCnt; + BYTE* _pData; + ULONG _dataSize; + ULONG _seekIndex; + }; + + class HttpConnection + { + public: + HttpConnection(); + ~HttpConnection(); + + bool init(HttpRequest *pRequest, DWORD timeOutInMs = 0); + bool open(std::string verb); + bool open(std::string verb, bool userAuthentication); + bool open(std::string verb, std::string cookieFile); + bool open(std::string verb, bool userAuthentication, std::string cookieFile); + bool send(); + DWORD getStatusCode(); + std::string getErrorMessage(); + std::vector* getResponseHeader(); + std::vector* getResponseData(); + + protected: + void cancelRequest(HRESULT hrError); + HRESULT authenticateUser(std::string& verb, std::string& url, std::string& headers); + HRESULT processCookieFile(std::string& url, std::string& cookieFile); + + private: + bool _isInitialized; + ComPtr _spXhr; + ComPtr _spXhrCallback; + ComPtr _spXhrRequestData; + DWORD _timeOutInMs; + cocos2d::network::HttpRequest* _pRequest; + }; +} + +NS_CC_END diff --git a/cocos/platform/winrt/DirectXBase.cpp b/cocos/platform/winrt/DirectXBase.cpp deleted file mode 100644 index 21e1359e6f..0000000000 --- a/cocos/platform/winrt/DirectXBase.cpp +++ /dev/null @@ -1,470 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software -// and associated documentation files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or -// substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -//----------------------------------------------------------------------------------------------- - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include "DirectXBase.h" -#include -#include - -using namespace Microsoft::WRL; -using namespace Windows::UI::Core; -using namespace Windows::UI::Xaml::Controls; -using namespace Windows::Foundation; -using namespace Windows::Graphics::Display; -using namespace D2D1; - -// Constructor. -DirectXBase::DirectXBase() : - m_dpi(-1.0f) -{ -} - -// Initialize the DirectX resources required to run. -void DirectXBase::Initialize(CoreWindow^ window, SwapChainBackgroundPanel^ panel, float dpi) -{ - m_window = window; - m_panel = panel; - - CreateDeviceIndependentResources(); - CreateDeviceResources(); - SetDpi(dpi); -} - -// These are the resources required independent of the device. -void DirectXBase::CreateDeviceIndependentResources() -{ - D2D1_FACTORY_OPTIONS options; - ZeroMemory(&options, sizeof(D2D1_FACTORY_OPTIONS)); - -#if defined(_DEBUG) - // If the project is in a debug build, enable Direct2D debugging via SDK Layers - options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION; -#endif - - DX::ThrowIfFailed( - D2D1CreateFactory( - D2D1_FACTORY_TYPE_SINGLE_THREADED, - __uuidof(ID2D1Factory1), - &options, - &m_d2dFactory - ) - ); - - DX::ThrowIfFailed( - DWriteCreateFactory( - DWRITE_FACTORY_TYPE_SHARED, - __uuidof(IDWriteFactory), - &m_dwriteFactory - ) - ); - - DX::ThrowIfFailed( - CoCreateInstance( - CLSID_WICImagingFactory, - nullptr, - CLSCTX_INPROC_SERVER, - IID_PPV_ARGS(&m_wicFactory) - ) - ); -} - -// These are the resources that depend on the device. -void DirectXBase::CreateDeviceResources() -{ - // This flag adds support for surfaces with a different color channel ordering than the API default. - // It is recommended usage, and is required for compatibility with Direct2D. - UINT creationFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT; - ComPtr dxgiDevice; - -#if defined(_DEBUG) - // If the project is in a debug build, enable debugging via SDK Layers with this flag. - creationFlags |= D3D11_CREATE_DEVICE_DEBUG; -#endif - - // This array defines the set of DirectX hardware feature levels this app will support. - // Note the ordering should be preserved. - // Don't forget to declare your application's minimum required feature level in its - // description. All applications are assumed to support 9.1 unless otherwise stated. - D3D_FEATURE_LEVEL featureLevels[] = - { - D3D_FEATURE_LEVEL_11_1, - D3D_FEATURE_LEVEL_11_0, - D3D_FEATURE_LEVEL_10_1, - D3D_FEATURE_LEVEL_10_0, - D3D_FEATURE_LEVEL_9_3, - D3D_FEATURE_LEVEL_9_2, - D3D_FEATURE_LEVEL_9_1 - }; - - // Create the DX11 API device object, and get a corresponding context. - ComPtr device; - ComPtr context; - DX::ThrowIfFailed( - D3D11CreateDevice( - nullptr, // specify null to use the default adapter - D3D_DRIVER_TYPE_HARDWARE, - 0, // leave as 0 unless software device - creationFlags, // optionally set debug and Direct2D compatibility flags - featureLevels, // list of feature levels this app can support - ARRAYSIZE(featureLevels), // number of entries in above list - D3D11_SDK_VERSION, // always set this to D3D11_SDK_VERSION for Metro style apps - &device, // returns the Direct3D device created - &m_featureLevel, // returns feature level of device created - &context // returns the device immediate context - ) - ); - - // Get the DirectX11.1 device by QI off the DirectX11 one. - DX::ThrowIfFailed( - device.As(&m_d3dDevice) - ); - - // And get the corresponding device context in the same way. - DX::ThrowIfFailed( - context.As(&m_d3dContext) - ); - - // Obtain the underlying DXGI device of the Direct3D11.1 device. - DX::ThrowIfFailed( - m_d3dDevice.As(&dxgiDevice) - ); - - // Obtain the Direct2D device for 2-D rendering. - DX::ThrowIfFailed( - m_d2dFactory->CreateDevice(dxgiDevice.Get(), &m_d2dDevice) - ); - - // And get its corresponding device context object. - DX::ThrowIfFailed( - m_d2dDevice->CreateDeviceContext( - D2D1_DEVICE_CONTEXT_OPTIONS_NONE, - &m_d2dContext - ) - ); - - // Release the swap chain (if it exists) as it will be incompatible with the new device. - m_swapChain = nullptr; -} - -// Helps track the DPI in the helper class. -// This is called in the dpiChanged event handler in the view class. -void DirectXBase::SetDpi(float dpi) -{ - if (dpi != m_dpi) - { - // Save the DPI of this display in our class. - m_dpi = dpi; - - // Update Direct2D's stored DPI. - m_d2dContext->SetDpi(m_dpi, m_dpi); - - // Often a DPI change implies a window size change. In some cases Windows will issues - // both a size changed event and a DPI changed event. In this case, the resulting bounds - // will not change, and the window resize code will only be executed once. - UpdateForWindowSizeChange(); - } -} - -// This routine is called in the event handler for the view SizeChanged event. -void DirectXBase::UpdateForWindowSizeChange() -{ - // Only handle window size changed if there is no pending DPI change. - if (m_dpi != DisplayProperties::LogicalDpi) - return; - - if (m_window->Bounds.Width != m_windowBounds.Width || - m_window->Bounds.Height != m_windowBounds.Height) - { - m_d2dContext->SetTarget(nullptr); - m_d2dTargetBitmap = nullptr; - m_renderTargetView = nullptr; - m_depthStencilView = nullptr; - CreateWindowSizeDependentResources(); - } -} - -// Allocate all memory resources that change on a window SizeChanged event. -void DirectXBase::CreateWindowSizeDependentResources() -{ - // Store the window bounds so the next time we get a SizeChanged event we can - // avoid rebuilding everything if the size is identical. - m_windowBounds = m_window->Bounds; - - // Calculate the necessary swap chain and render target size in pixels. - m_renderTargetSize.Width = ConvertDipsToPixels(m_windowBounds.Width); - m_renderTargetSize.Height = ConvertDipsToPixels(m_windowBounds.Height); - - // If the swap chain already exists, resize it. - if (m_swapChain != nullptr) - { - DX::ThrowIfFailed( - m_swapChain->ResizeBuffers( - 2, - static_cast(m_renderTargetSize.Width), - static_cast(m_renderTargetSize.Height), - DXGI_FORMAT_B8G8R8A8_UNORM, - 0 - ) - ); - } - // Otherwise, create a new one. - else - { - // Allocate a descriptor. - DXGI_SWAP_CHAIN_DESC1 swapChainDesc = {0}; - swapChainDesc.Width = static_cast(m_renderTargetSize.Width); // Match the size of the windowm. - swapChainDesc.Height = static_cast(m_renderTargetSize.Height); - swapChainDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; // This is the most common swapchain format. - swapChainDesc.Stereo = false; - swapChainDesc.SampleDesc.Count = 1; // Don't use multi-sampling. - swapChainDesc.SampleDesc.Quality = 0; - swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - swapChainDesc.BufferCount = 2; // Use double buffering to enable flip. - swapChainDesc.Scaling = DXGI_SCALING_STRETCH; - swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; // All Metro style apps must use this SwapEffect. - swapChainDesc.Flags = 0; - - // Once the desired swap chain description is configured, it must be created on the same adapter as our D3D Device. - - // First, retrieve the underlying DXGI Device from the D3D Device. - ComPtr dxgiDevice; - DX::ThrowIfFailed( - m_d3dDevice.As(&dxgiDevice) - ); - - // Identify the physical adapter (GPU or card) this device is running on. - ComPtr dxgiAdapter; - DX::ThrowIfFailed( - dxgiDevice->GetAdapter(&dxgiAdapter) - ); - - // And obtain the factory object that created it. - ComPtr dxgiFactory; - DX::ThrowIfFailed( - dxgiAdapter->GetParent(IID_PPV_ARGS(&dxgiFactory)) - ); - - // Create the swap chain and then associate it with the SwapChainBackgroundPanel. - DX::ThrowIfFailed( - dxgiFactory->CreateSwapChainForComposition( - m_d3dDevice.Get(), - &swapChainDesc, - nullptr, - &m_swapChain - ) - ); - - ComPtr panelNative; - DX::ThrowIfFailed( - reinterpret_cast(m_panel)->QueryInterface(IID_PPV_ARGS(&panelNative)) - ); - - DX::ThrowIfFailed( - panelNative->SetSwapChain(m_swapChain.Get()) - ); - - // Ensure that DXGI does not queue more than one frame at a time. This both reduces - // latency and ensures that the application will only render after each VSync, minimizing - // power consumption. - DX::ThrowIfFailed( - dxgiDevice->SetMaximumFrameLatency(1) - ); - } - - // Obtain the backbuffer for this window which will be the final 3D rendertarget. - ComPtr backBuffer; - DX::ThrowIfFailed( - m_swapChain->GetBuffer(0, IID_PPV_ARGS(&backBuffer)) - ); - - // Create a view interface on the rendertarget to use on bind. - DX::ThrowIfFailed( - m_d3dDevice->CreateRenderTargetView( - backBuffer.Get(), - nullptr, - &m_renderTargetView - ) - ); - - // Create a descriptor for the depth/stencil buffer. - CD3D11_TEXTURE2D_DESC depthStencilDesc( - DXGI_FORMAT_D24_UNORM_S8_UINT, - static_cast(m_renderTargetSize.Width), - static_cast(m_renderTargetSize.Height), - 1, - 1, - D3D11_BIND_DEPTH_STENCIL - ); - - // Allocate a 2-D surface as the depth/stencil buffer. - ComPtr depthStencil; - DX::ThrowIfFailed( - m_d3dDevice->CreateTexture2D( - &depthStencilDesc, - nullptr, - &depthStencil - ) - ); - - // Create a DepthStencil view on this surface to use on bind. - CD3D11_DEPTH_STENCIL_VIEW_DESC depthStencilViewDesc(D3D11_DSV_DIMENSION_TEXTURE2D); - DX::ThrowIfFailed( - m_d3dDevice->CreateDepthStencilView( - depthStencil.Get(), - &depthStencilViewDesc, - &m_depthStencilView - ) - ); - - // Create a viewport descriptor of the full window size. - CD3D11_VIEWPORT viewport( - 0.0f, - 0.0f, - m_renderTargetSize.Width, - m_renderTargetSize.Height - ); - - // Set the current viewport using the descriptor. - m_d3dContext->RSSetViewports(1, &viewport); - - // Now we set up the Direct2D render target bitmap linked to the swapchain. - // Whenever we render to this bitmap, it will be directly rendered to the - // swapchain associated with the window. - D2D1_BITMAP_PROPERTIES1 bitmapProperties = - BitmapProperties1( - D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW, - PixelFormat(DXGI_FORMAT_B8G8R8A8_UNORM, D2D1_ALPHA_MODE_PREMULTIPLIED), - m_dpi, - m_dpi - ); - - // Direct2D needs the DXGI version of the backbuffer surface pointer. - ComPtr dxgiBackBuffer; - DX::ThrowIfFailed( - m_swapChain->GetBuffer(0, IID_PPV_ARGS(&dxgiBackBuffer)) - ); - - // Get a D2D surface from the DXGI back buffer to use as the D2D render target. - DX::ThrowIfFailed( - m_d2dContext->CreateBitmapFromDxgiSurface( - dxgiBackBuffer.Get(), - &bitmapProperties, - &m_d2dTargetBitmap - ) - ); - - // So now we can set the Direct2D render target. - m_d2dContext->SetTarget(m_d2dTargetBitmap.Get()); - - // Set D2D text anti-alias mode to Grayscale to ensure proper rendering of text on intermediate surfaces. - m_d2dContext->SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE); - - // Set the blend function. - ID3D11BlendState* g_pBlendState = NULL; - D3D11_BLEND_DESC blendDesc; - ZeroMemory(&blendDesc, sizeof(D3D11_BLEND_DESC)); - blendDesc.AlphaToCoverageEnable = false; - blendDesc.IndependentBlendEnable = false; - D3D11_RENDER_TARGET_BLEND_DESC rtBlendDesc; - rtBlendDesc.BlendEnable = false; - rtBlendDesc.SrcBlend = D3D11_BLEND_SRC_ALPHA; - rtBlendDesc.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; - rtBlendDesc.BlendOp = D3D11_BLEND_OP_ADD; - rtBlendDesc.SrcBlendAlpha = D3D11_BLEND_ZERO; - rtBlendDesc.DestBlendAlpha = D3D11_BLEND_ZERO; - rtBlendDesc.BlendOpAlpha = D3D11_BLEND_OP_ADD; - rtBlendDesc.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; - blendDesc.RenderTarget[0] = rtBlendDesc; - - auto hr1 = m_d3dDevice->CreateBlendState(&blendDesc, &g_pBlendState); - m_d3dContext->OMSetBlendState(g_pBlendState, 0, 0xffffffff); - - D3D11_DEPTH_STENCIL_DESC dsDesc; - // Depth test parameters - dsDesc.DepthEnable = false; - dsDesc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL; - dsDesc.DepthFunc = D3D11_COMPARISON_LESS; - - // Stencil test parameters - dsDesc.StencilEnable = true; - dsDesc.StencilReadMask = 0xFF; - dsDesc.StencilWriteMask = 0xFF; - - // Stencil operations if pixel is front-facing - dsDesc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; - dsDesc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_INCR; - dsDesc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; - dsDesc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - - // Stencil operations if pixel is back-facing - dsDesc.BackFace.StencilFailOp = D3D11_STENCIL_OP_KEEP; - dsDesc.BackFace.StencilDepthFailOp = D3D11_STENCIL_OP_DECR; - dsDesc.BackFace.StencilPassOp = D3D11_STENCIL_OP_KEEP; - dsDesc.BackFace.StencilFunc = D3D11_COMPARISON_ALWAYS; - - // Create depth stencil state - ID3D11DepthStencilState * pDSState; - m_d3dDevice->CreateDepthStencilState(&dsDesc, &pDSState); - m_d3dContext->OMSetDepthStencilState(pDSState, 1); - m_d3dContext->OMSetRenderTargets(1, m_renderTargetView.GetAddressOf(), m_depthStencilView.Get()); -} - -// Method to deliver the final image to the display. -void DirectXBase::Present() -{ - // The application may optionally specify "dirty" or "scroll" rects to improve efficiency - // in certain scenarios. - DXGI_PRESENT_PARAMETERS parameters = {0}; - parameters.DirtyRectsCount = 0; - parameters.pDirtyRects = nullptr; - parameters.pScrollRect = nullptr; - parameters.pScrollOffset = nullptr; - - - - // The first argument instructs DXGI to block until VSync, putting the application - // to sleep until the next VSync. This ensures we don't waste any cycles rendering - // frames that will never be displayed to the screen. - HRESULT hr = m_swapChain->Present1(1, 0, ¶meters); - m_d3dContext->OMSetRenderTargets(1,m_renderTargetView.GetAddressOf(),m_depthStencilView.Get()); - - - - // If the device was removed either by a disconnect or a driver upgrade, we - // must completely reinitialize the renderer. - if (hr == DXGI_ERROR_DEVICE_REMOVED || hr == DXGI_ERROR_DEVICE_RESET) - { - Initialize(m_window.Get(), m_panel, m_dpi); - } - else - { - DX::ThrowIfFailed(hr); - } -} - -// Method to convert a length in device-independent pixels (DIPs) to a length in physical pixels. -float DirectXBase::ConvertDipsToPixels(float dips) -{ - static const float dipsPerInch = 96.0f; - return floor(dips * m_dpi / dipsPerInch + 0.5f); // Round to nearest integer. -} - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/DirectXBase.h b/cocos/platform/winrt/DirectXBase.h deleted file mode 100644 index 87f3aef4cc..0000000000 --- a/cocos/platform/winrt/DirectXBase.h +++ /dev/null @@ -1,83 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software -// and associated documentation files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or -// substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -//----------------------------------------------------------------------------------------------- -#pragma once - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -#include -#include -#include -#include -#include -#include -#include -#include -#include "DirectXHelper.h" - -#pragma warning (disable: 4449) -using namespace Windows::UI::ViewManagement; - -// Helper class that initializes DirectX APIs -ref class DirectXBase abstract -{ -internal: - DirectXBase(); - -public: - virtual void Initialize(Windows::UI::Core::CoreWindow^ window, Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ panel, float dpi); - virtual void CreateDeviceIndependentResources(); - virtual void CreateDeviceResources(); - virtual void SetDpi(float dpi); - virtual void CreateWindowSizeDependentResources(); - virtual void UpdateForWindowSizeChange(); - virtual void Present(); - virtual float ConvertDipsToPixels(float dips); - -protected private: - - Platform::Agile m_window; - Windows::UI::Xaml::Controls::SwapChainBackgroundPanel^ m_panel; - - // Direct2D Objects - Microsoft::WRL::ComPtr m_d2dFactory; - Microsoft::WRL::ComPtr m_d2dDevice; - Microsoft::WRL::ComPtr m_d2dContext; - Microsoft::WRL::ComPtr m_d2dTargetBitmap; - - // DirectWrite & Windows Imaging Component Objects - Microsoft::WRL::ComPtr m_dwriteFactory; - Microsoft::WRL::ComPtr m_wicFactory; - - // Direct3D Objects - Microsoft::WRL::ComPtr m_d3dDevice; - Microsoft::WRL::ComPtr m_d3dContext; - Microsoft::WRL::ComPtr m_swapChain; - Microsoft::WRL::ComPtr m_renderTargetView; - Microsoft::WRL::ComPtr m_depthStencilView; - - D3D_FEATURE_LEVEL m_featureLevel; - Windows::Foundation::Size m_renderTargetSize; - Windows::Foundation::Rect m_windowBounds; - float m_dpi; -}; - -#pragma warning (default: 4449) - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/platform/winrt/DirectXHelper.h b/cocos/platform/winrt/DirectXHelper.h deleted file mode 100644 index 9ff8d58538..0000000000 --- a/cocos/platform/winrt/DirectXHelper.h +++ /dev/null @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------------------------- -// Copyright (c) 2012 Andrew Garrison -//----------------------------------------------------------------------------------------------- -// Permission is hereby granted, free of charge, to any person obtaining a copy of this software -// and associated documentation files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all copies or -// substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -// BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -//----------------------------------------------------------------------------------------------- -#pragma once - - -#include "platform/CCPlatformConfig.h" -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - -// Helper utilities to make Win32 APIs work with exceptions. -namespace DX -{ - inline void ThrowIfFailed(HRESULT hr) - { - if (FAILED(hr)) - { - // Set a breakpoint on this line to catch Win32 API errors. - throw Platform::Exception::CreateException(hr); - } - } -} - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index e7fb405dd5..6d0b91aeb1 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -793,7 +793,7 @@ namespace ui { //shrink the image size when it is 9-patch if(_isPatch9) { - float offset = 1.4; + float offset = 1.4f; //Top left if(!_spriteFrameRotated) { diff --git a/extensions/assets-manager/AssetsManager.h b/extensions/assets-manager/AssetsManager.h index 8cb4e48017..ce21d884e1 100644 --- a/extensions/assets-manager/AssetsManager.h +++ b/extensions/assets-manager/AssetsManager.h @@ -33,6 +33,8 @@ #include "extensions/ExtensionMacros.h" #include "extensions/ExtensionExport.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + NS_CC_EXT_BEGIN class AssetsManagerDelegateProtocol; @@ -237,4 +239,5 @@ CC_DEPRECATED_ATTRIBUTE typedef AssetsManagerDelegateProtocol CCAssetsManagerDel NS_CC_EXT_END; +#endif /* #if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) */ #endif /* defined(__AssetsManager__) */ diff --git a/extensions/assets-manager/Downloader.cpp b/extensions/assets-manager/Downloader.cpp index 1175e6baa3..e14089a0d8 100644 --- a/extensions/assets-manager/Downloader.cpp +++ b/extensions/assets-manager/Downloader.cpp @@ -273,13 +273,6 @@ void Downloader::prepareDownload(const std::string &srcUrl, const std::string &s } } -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) -Downloader::HeaderInfo Downloader::prepare(const std::string &srcUrl) -{ - return prepareHeader(srcUrl); -} -#endif - Downloader::HeaderInfo Downloader::prepareHeader(const std::string &srcUrl, void* header/* = nullptr */) { bool headerGiven = true; @@ -335,11 +328,7 @@ long Downloader::getContentSize(const std::string &srcUrl) void Downloader::getHeaderAsync(const std::string &srcUrl, const HeaderCallback &callback) { setHeaderCallback(callback); -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - auto t = std::thread(&Downloader::prepare, this, srcUrl); -#else auto t = std::thread(&Downloader::prepareHeader, this, srcUrl, nullptr); -#endif t.detach(); } diff --git a/extensions/assets-manager/Downloader.h b/extensions/assets-manager/Downloader.h index 46893ec6ce..43960e162c 100644 --- a/extensions/assets-manager/Downloader.h +++ b/extensions/assets-manager/Downloader.h @@ -170,9 +170,6 @@ protected: void prepareDownload(const std::string &srcUrl, const std::string &storagePath, const std::string &customId, bool resumeDownload, FileDescriptor *fDesc, ProgressData *pData); -#if(CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - HeaderInfo prepare(const std::string &srcUrl); -#endif HeaderInfo prepareHeader(const std::string &srcUrl, void* header = nullptr); void downloadToBuffer(const std::string &srcUrl, const std::string &customId, const StreamData &buffer, const ProgressData &data); diff --git a/extensions/assets-manager/Manifest.cpp b/extensions/assets-manager/Manifest.cpp index d7541f7a2d..5d8dfa53a6 100644 --- a/extensions/assets-manager/Manifest.cpp +++ b/extensions/assets-manager/Manifest.cpp @@ -329,10 +329,9 @@ void Manifest::setAssetDownloadState(const std::string &key, const Manifest::Dow std::string jkey = itr->name.GetString(); if (jkey == key) { rapidjson::Value &entry = itr->value; - rapidjson::Value &value = entry[KEY_DOWNLOAD_STATE]; - if (value.IsInt()) + if (entry.HasMember(KEY_DOWNLOAD_STATE) && entry[KEY_DOWNLOAD_STATE].IsInt()) { - value.SetInt((int)state); + entry[KEY_DOWNLOAD_STATE].SetInt((int) state); } else { diff --git a/extensions/cocos-ext.h b/extensions/cocos-ext.h index c0f83798d8..283eede1fb 100644 --- a/extensions/cocos-ext.h +++ b/extensions/cocos-ext.h @@ -12,11 +12,15 @@ #include "physics-nodes/CCPhysicsDebugNode.h" #include "physics-nodes/CCPhysicsSprite.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) +// Window 10 UWP does not yet support CURL #include "assets-manager/AssetsManager.h" #include "assets-manager/AssetsManagerEx.h" #include "assets-manager/CCEventAssetsManagerEx.h" #include "assets-manager/CCEventListenerAssetsManagerEx.h" #include "assets-manager/Manifest.h" +#endif + #include "ExtensionDeprecated.h" // Particle System, include Particle Universe Particle System diff --git a/templates/cpp-template-default/cocos-project-template.json b/templates/cpp-template-default/cocos-project-template.json index 37da10163d..a89a2ccac2 100644 --- a/templates/cpp-template-default/cocos-project-template.json +++ b/templates/cpp-template-default/cocos-project-template.json @@ -19,7 +19,11 @@ "proj.win8.1-universal/App.Windows/PROJECT_NAME.Windows.vcxproj", "proj.win8.1-universal/App.Windows/PROJECT_NAME.Windows.vcxproj.filters", "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj", - "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj.filters" + "proj.win8.1-universal/App.WindowsPhone/PROJECT_NAME.WindowsPhone.vcxproj.filters", + "proj.win10/PROJECT_NAME.sln", + "proj.win10/App/PROJECT_NAME.vcxproj", + "proj.win10/App/PROJECT_NAME.vcxproj.filters", + "proj.win10/App/PROJECT_NAME_TemporaryKey.pfx" ] }, "project_replace_project_name":{ @@ -46,6 +50,10 @@ "proj.ios_mac/ios/main.m", "proj.ios_mac/ios/Prefix.pch", "proj.ios_mac/PROJECT_NAME.xcodeproj/project.pbxproj", + "proj.win10/PROJECT_NAME.sln", + "proj.win10/App/PROJECT_NAME.vcxproj", + "proj.win10/App/PROJECT_NAME.vcxproj.filters", + "proj.win10/App/Package.appxmanifest", "CMakeLists.txt" ] }, diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml b/templates/cpp-template-default/proj.win10/App/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml.cpp b/templates/cpp-template-default/proj.win10/App/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/templates/cpp-template-default/proj.win10/App/App.xaml.h b/templates/cpp-template-default/proj.win10/App/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/Logo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/SmallLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/SplashScreen.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/StoreLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png b/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/Assets/WideLogo.scale-100.png differ diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp new file mode 100644 index 0000000000..85212dfded --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.cpp @@ -0,0 +1,158 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "Cocos2dRenderer.h" +#include "AppDelegate.h" +#include "CCGLViewImpl-winrt.h" +#include "CCApplication.h" +#include "cocos2d.h" +#include "renderer/CCTextureCache.h" + +// These are used by the shader compilation methods. +#include +#include +#include + +using namespace Platform; +using namespace Windows::UI::Core; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::Graphics::Display; + +USING_NS_CC; + + +Cocos2dRenderer::Cocos2dRenderer(int width, int height, float dpi, DisplayOrientations orientation, CoreDispatcher^ dispatcher, Panel^ panel) + : m_app(nullptr) + , m_width(width) + , m_height(height) + , m_dpi(dpi) + , m_dispatcher(dispatcher) + , m_panel(panel) + , m_orientation(orientation) +{ + m_app = new AppDelegate(); +} + +Cocos2dRenderer::~Cocos2dRenderer() +{ + delete m_app; +} + +void Cocos2dRenderer::Resume() +{ + auto director = cocos2d::Director::getInstance(); + auto glview = director->getOpenGLView(); + + if (!glview) + { + GLViewImpl* glview = GLViewImpl::create("Test Cpp"); + glview->setDispatcher(m_dispatcher.Get()); + glview->setPanel(m_panel.Get()); + glview->Create(static_cast(m_width), static_cast(m_height), m_dpi, m_orientation); + director->setOpenGLView(glview); + CCApplication::getInstance()->run(); + } + else + { + Application::getInstance()->applicationWillEnterForeground(); + cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); + } +} + +void Cocos2dRenderer::Pause() +{ + if (Director::getInstance()->getOpenGLView()) { + Application::getInstance()->applicationDidEnterBackground(); + cocos2d::EventCustom backgroundEvent(EVENT_COME_TO_BACKGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&backgroundEvent); + } +} + +bool Cocos2dRenderer::AppShouldExit() +{ + return GLViewImpl::sharedOpenGLView()->AppShouldExit(); +} + +void Cocos2dRenderer::DeviceLost() +{ + Pause(); + + auto director = cocos2d::Director::getInstance(); + if (director->getOpenGLView()) { + cocos2d::GL::invalidateStateCache(); + cocos2d::GLProgramCache::getInstance()->reloadDefaultGLPrograms(); + cocos2d::DrawPrimitives::init(); + cocos2d::VolatileTextureMgr::reloadAllTextures(); + + cocos2d::EventCustom recreatedEvent(EVENT_RENDERER_RECREATED); + director->getEventDispatcher()->dispatchEvent(&recreatedEvent); + director->setGLDefaultValues(); + + Application::getInstance()->applicationWillEnterForeground(); + cocos2d::EventCustom foregroundEvent(EVENT_COME_TO_FOREGROUND); + cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&foregroundEvent); + } +} + + + +void Cocos2dRenderer::Draw(GLsizei width, GLsizei height, float dpi, DisplayOrientations orientation) +{ + auto glView = GLViewImpl::sharedOpenGLView(); + + if (orientation != m_orientation) + { + m_orientation = orientation; + glView->UpdateOrientation(orientation); + } + + if (width != m_width || height != m_height) + { + m_width = width; + m_height = height; + glView->UpdateForWindowSizeChange(static_cast(width), static_cast(height)); + } + + if (dpi != m_dpi) + { + m_dpi = dpi; + glView->SetDPI(m_dpi); + } + + glView->ProcessEvents(); + glView->Render(); +} + +void Cocos2dRenderer::QueuePointerEvent(cocos2d::PointerEventType type, Windows::UI::Core::PointerEventArgs^ args) +{ + GLViewImpl::sharedOpenGLView()->QueuePointerEvent(type, args); +} + +void Cocos2dRenderer::QueueBackButtonEvent() +{ + GLViewImpl::sharedOpenGLView()->QueueBackKeyPress(); +} + +void Cocos2dRenderer::QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args) +{ + GLViewImpl::sharedOpenGLView()->QueueWinRTKeyboardEvent(type, args); +} + + + diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h new file mode 100644 index 0000000000..b348c50043 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/Cocos2dRenderer.h @@ -0,0 +1,57 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ +#pragma once + +#include + +#include "cocos2d.h" + + +class AppDelegate; + +namespace cocos2d +{ + class Cocos2dRenderer + { + public: + Cocos2dRenderer(int width, int height, float dpi, + Windows::Graphics::Display::DisplayOrientations orientation, + Windows::UI::Core::CoreDispatcher^ dispathcer, Windows::UI::Xaml::Controls::Panel^ panel); + ~Cocos2dRenderer(); + void Draw(GLsizei width, GLsizei height, float dpi, Windows::Graphics::Display::DisplayOrientations orientation); + void QueuePointerEvent(PointerEventType type, Windows::UI::Core::PointerEventArgs^ args); + void QueueKeyboardEvent(WinRTKeyboardEventType type, Windows::UI::Core::KeyEventArgs^ args); + void QueueBackButtonEvent(); + void Pause(); + void Resume(); + void DeviceLost(); + bool AppShouldExit(); + + private: + + int m_width; + int m_height; + float m_dpi; + + // The AppDelegate for the Cocos2D app + AppDelegate* m_app; + Platform::Agile m_dispatcher; + Platform::Agile m_panel; + Windows::Graphics::Display::DisplayOrientations m_orientation; + }; +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp new file mode 100644 index 0000000000..3afdab08a9 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.cpp @@ -0,0 +1,246 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "OpenGLES.h" +using namespace Platform; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; + +OpenGLES::OpenGLES() : + mEglConfig(nullptr), + mEglDisplay(EGL_NO_DISPLAY), + mEglContext(EGL_NO_CONTEXT) +{ + Initialize(); +} + +OpenGLES::~OpenGLES() +{ + Cleanup(); +} + +void OpenGLES::Initialize() +{ + const EGLint configAttributes[] = + { + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 8, + EGL_STENCIL_SIZE, 8, + EGL_NONE + }; + + const EGLint contextAttributes[] = + { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + + const EGLint defaultDisplayAttributes[] = + { + // These are the default display attributes, used to request ANGLE's D3D11 renderer. + // eglInitialize will only succeed with these attributes if the hardware supports D3D11 Feature Level 10_0+. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + + // EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is an optimization that can have large performance benefits on mobile devices. + // Its syntax is subject to change, though. Please update your Visual Studio templates if you experience compilation issues with it. + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + + // EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE is an option that enables ANGLE to automatically call + // the IDXGIDevice3::Trim method on behalf of the application when it gets suspended. + // Calling IDXGIDevice3::Trim when an application is suspended is a Windows Store application certification requirement. + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + const EGLint fl9_3DisplayAttributes[] = + { + // These can be used to request ANGLE's D3D11 renderer, with D3D11 Feature Level 9_3. + // These attributes are used if the call to eglInitialize fails with the default display attributes. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_MAX_VERSION_MAJOR_ANGLE, 9, + EGL_PLATFORM_ANGLE_MAX_VERSION_MINOR_ANGLE, 3, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + const EGLint warpDisplayAttributes[] = + { + // These attributes can be used to request D3D11 WARP. + // They are used if eglInitialize fails with both the default display attributes and the 9_3 display attributes. + EGL_PLATFORM_ANGLE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_TYPE_D3D11_ANGLE, + EGL_PLATFORM_ANGLE_DEVICE_TYPE_ANGLE, EGL_PLATFORM_ANGLE_DEVICE_TYPE_WARP_ANGLE, + EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_PLATFORM_ANGLE_ENABLE_AUTOMATIC_TRIM_ANGLE, EGL_TRUE, + EGL_NONE, + }; + + EGLConfig config = NULL; + + // eglGetPlatformDisplayEXT is an alternative to eglGetDisplay. It allows us to pass in display attributes, used to configure D3D11. + PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT = reinterpret_cast(eglGetProcAddress("eglGetPlatformDisplayEXT")); + if (!eglGetPlatformDisplayEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to get function eglGetPlatformDisplayEXT"); + } + + // + // To initialize the display, we make three sets of calls to eglGetPlatformDisplayEXT and eglInitialize, with varying + // parameters passed to eglGetPlatformDisplayEXT: + // 1) The first calls uses "defaultDisplayAttributes" as a parameter. This corresponds to D3D11 Feature Level 10_0+. + // 2) If eglInitialize fails for step 1 (e.g. because 10_0+ isn't supported by the default GPU), then we try again + // using "fl9_3DisplayAttributes". This corresponds to D3D11 Feature Level 9_3. + // 3) If eglInitialize fails for step 2 (e.g. because 9_3+ isn't supported by the default GPU), then we try again + // using "warpDisplayAttributes". This corresponds to D3D11 Feature Level 11_0 on WARP, a D3D11 software rasterizer. + // + // Note: On Windows Phone, we #ifdef out the first set of calls to eglPlatformDisplayEXT and eglInitialize. + // Windows Phones devices only support D3D11 Feature Level 9_3, but the Windows Phone emulator supports 11_0+. + // We use this #ifdef to limit the Phone emulator to Feature Level 9_3, making it behave more like + // real Windows Phone devices. + // If you wish to test Feature Level 10_0+ in the Windows Phone emulator then you should remove this #ifdef. + // + +#if (WINAPI_FAMILY != WINAPI_FAMILY_PHONE_APP) + // This tries to initialize EGL to D3D11 Feature Level 10_0+. See above comment for details. + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, defaultDisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) +#endif + { + // This tries to initialize EGL to D3D11 Feature Level 9_3, if 10_0+ is unavailable (e.g. on Windows Phone, or certain Windows tablets). + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, fl9_3DisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) + { + // This initializes EGL to D3D11 Feature Level 11_0 on WARP, if 9_3+ is unavailable on the default GPU (e.g. on Surface RT). + mEglDisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, EGL_DEFAULT_DISPLAY, warpDisplayAttributes); + if (mEglDisplay == EGL_NO_DISPLAY) + { + throw Exception::CreateException(E_FAIL, L"Failed to get EGL display"); + } + + if (eglInitialize(mEglDisplay, NULL, NULL) == EGL_FALSE) + { + // If all of the calls to eglInitialize returned EGL_FALSE then an error has occurred. + throw Exception::CreateException(E_FAIL, L"Failed to initialize EGL"); + } + } + } + + EGLint numConfigs = 0; + if ((eglChooseConfig(mEglDisplay, configAttributes, &mEglConfig, 1, &numConfigs) == EGL_FALSE) || (numConfigs == 0)) + { + throw Exception::CreateException(E_FAIL, L"Failed to choose first EGLConfig"); + } + + mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, contextAttributes); + if (mEglContext == EGL_NO_CONTEXT) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL context"); + } +} + +void OpenGLES::Cleanup() +{ + if (mEglDisplay != EGL_NO_DISPLAY && mEglContext != EGL_NO_CONTEXT) + { + eglDestroyContext(mEglDisplay, mEglContext); + mEglContext = EGL_NO_CONTEXT; + } + + if (mEglDisplay != EGL_NO_DISPLAY) + { + eglTerminate(mEglDisplay); + mEglDisplay = EGL_NO_DISPLAY; + } +} + +void OpenGLES::Reset() +{ + Cleanup(); + Initialize(); +} + +EGLSurface OpenGLES::CreateSurface(SwapChainPanel^ panel, const Size* renderSurfaceSize) +{ + if (!panel) + { + throw Exception::CreateException(E_INVALIDARG, L"SwapChainPanel parameter is invalid"); + } + + EGLSurface surface = EGL_NO_SURFACE; + + const EGLint surfaceAttributes[] = + { + // EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER is part of the same optimization as EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER (see above). + // If you have compilation issues with it then please update your Visual Studio templates. + EGL_ANGLE_SURFACE_RENDER_TO_BACK_BUFFER, EGL_TRUE, + EGL_NONE + }; + + // Create a PropertySet and initialize with the EGLNativeWindowType. + PropertySet^ surfaceCreationProperties = ref new PropertySet(); + surfaceCreationProperties->Insert(ref new String(EGLNativeWindowTypeProperty), panel); + + // If a render surface size is specified, add it to the surface creation properties + if (renderSurfaceSize != nullptr) + { + surfaceCreationProperties->Insert(ref new String(EGLRenderSurfaceSizeProperty), PropertyValue::CreateSize(*renderSurfaceSize)); + } + + surface = eglCreateWindowSurface(mEglDisplay, mEglConfig, reinterpret_cast(surfaceCreationProperties), surfaceAttributes); + if (surface == EGL_NO_SURFACE) + { + throw Exception::CreateException(E_FAIL, L"Failed to create EGL surface"); + } + + return surface; +} + +void OpenGLES::DestroySurface(const EGLSurface surface) +{ + if (mEglDisplay != EGL_NO_DISPLAY && surface != EGL_NO_SURFACE) + { + eglDestroySurface(mEglDisplay, surface); + } +} + +void OpenGLES::MakeCurrent(const EGLSurface surface) +{ + if (eglMakeCurrent(mEglDisplay, surface, surface, mEglContext) == EGL_FALSE) + { + throw Exception::CreateException(E_FAIL, L"Failed to make EGLSurface current"); + } +} + +EGLBoolean OpenGLES::SwapBuffers(const EGLSurface surface) +{ + return (eglSwapBuffers(mEglDisplay, surface)); +} diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h new file mode 100644 index 0000000000..e2e7d7e8aa --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLES.h @@ -0,0 +1,51 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#pragma once + +// OpenGL ES includes +#include +#include + +// EGL includes +#include +#include +#include +#include + +class OpenGLES +{ +public: + OpenGLES(); + ~OpenGLES(); + + EGLSurface CreateSurface(Windows::UI::Xaml::Controls::SwapChainPanel^ panel, const Windows::Foundation::Size* renderSurfaceSize); + void DestroySurface(const EGLSurface surface); + void MakeCurrent(const EGLSurface surface); + EGLBoolean SwapBuffers(const EGLSurface surface); + void Reset(); + void Cleanup(); + +private: + void Initialize(); + +private: + EGLDisplay mEglDisplay; + EGLContext mEglContext; + EGLConfig mEglConfig; +}; diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml new file mode 100644 index 0000000000..e5b62802a5 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml @@ -0,0 +1,28 @@ + + + + + + + + + + + diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp new file mode 100644 index 0000000000..fc4a36bc71 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.cpp @@ -0,0 +1,418 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; +using namespace Platform; +using namespace Concurrency; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::Graphics::Display; +using namespace Windows::System::Threading; +using namespace Windows::UI::Core; +using namespace Windows::UI::Input; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Controls::Primitives; +using namespace Windows::UI::Xaml::Data; +using namespace Windows::UI::Xaml::Input; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; + +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 +using namespace Windows::Phone::UI::Input; +#endif + +OpenGLESPage::OpenGLESPage() : + OpenGLESPage(nullptr) +{ + +} + +OpenGLESPage::OpenGLESPage(OpenGLES* openGLES) : + mOpenGLES(openGLES), + mRenderSurface(EGL_NO_SURFACE), + mCustomRenderSurfaceSize(0,0), + mUseCustomRenderSurfaceSize(false), + m_coreInput(nullptr), + m_dpi(0.0f), + m_deviceLost(false), + m_orientation(DisplayOrientations::Landscape) +{ + InitializeComponent(); + + Windows::UI::Core::CoreWindow^ window = Windows::UI::Xaml::Window::Current->CoreWindow; + + window->VisibilityChanged += + ref new Windows::Foundation::TypedEventHandler(this, &OpenGLESPage::OnVisibilityChanged); + + window->KeyDown += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyPressed); + + window->KeyUp += ref new TypedEventHandler(this, &OpenGLESPage::OnKeyReleased); + + window->CharacterReceived += ref new TypedEventHandler(this, &OpenGLESPage::OnCharacterReceived); + + swapChainPanel->SizeChanged += + ref new Windows::UI::Xaml::SizeChangedEventHandler(this, &OpenGLESPage::OnSwapChainPanelSizeChanged); + + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + + currentDisplayInformation->OrientationChanged += + ref new TypedEventHandler(this, &OpenGLESPage::OnOrientationChanged); + + m_orientation = currentDisplayInformation->CurrentOrientation; + + this->Loaded += + ref new Windows::UI::Xaml::RoutedEventHandler(this, &OpenGLESPage::OnPageLoaded); + + mSwapChainPanelSize = { swapChainPanel->RenderSize.Width, swapChainPanel->RenderSize.Height }; + +#if _MSC_VER >= 1900 + if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.UI.ViewManagement.StatusBar")) + { + Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); + } + + if (Windows::Foundation::Metadata::ApiInformation::IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) + { + HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); + } +#else +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) + Windows::UI::ViewManagement::StatusBar::GetForCurrentView()->HideAsync(); + HardwareButtons::BackPressed += ref new EventHandler(this, &OpenGLESPage::OnBackButtonPressed); +#else + // Disable all pointer visual feedback for better performance when touching. + // This is not supported on Windows Phone applications. + auto pointerVisualizationSettings = Windows::UI::Input::PointerVisualizationSettings::GetForCurrentView(); + pointerVisualizationSettings->IsContactFeedbackEnabled = false; + pointerVisualizationSettings->IsBarrelButtonFeedbackEnabled = false; +#endif +#endif + + // Register our SwapChainPanel to get independent input pointer events + auto workItemHandler = ref new WorkItemHandler([this](IAsyncAction ^) + { + // The CoreIndependentInputSource will raise pointer events for the specified device types on whichever thread it's created on. + m_coreInput = swapChainPanel->CreateCoreIndependentInputSource( + Windows::UI::Core::CoreInputDeviceTypes::Mouse | + Windows::UI::Core::CoreInputDeviceTypes::Touch | + Windows::UI::Core::CoreInputDeviceTypes::Pen + ); + + // Register for pointer events, which will be raised on the background thread. + m_coreInput->PointerPressed += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerPressed); + m_coreInput->PointerMoved += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerMoved); + m_coreInput->PointerReleased += ref new TypedEventHandler(this, &OpenGLESPage::OnPointerReleased); + + // Begin processing input messages as they're delivered. + m_coreInput->Dispatcher->ProcessEvents(CoreProcessEventsOption::ProcessUntilQuit); + }); + + // Run task on a dedicated high priority background thread. + m_inputLoopWorker = ThreadPool::RunAsync(workItemHandler, WorkItemPriority::High, WorkItemOptions::TimeSliced); +} + +OpenGLESPage::~OpenGLESPage() +{ + StopRenderLoop(); + DestroyRenderSurface(); +} + +void OpenGLESPage::OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) +{ + // The SwapChainPanel has been created and arranged in the page layout, so EGL can be initialized. + CreateRenderSurface(); + StartRenderLoop(); +} + +void OpenGLESPage::OnPointerPressed(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerPressed, e); + } +} + +void OpenGLESPage::OnPointerMoved(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerMoved, e); + } +} + +void OpenGLESPage::OnPointerReleased(Object^ sender, PointerEventArgs^ e) +{ + if (m_renderer) + { + m_renderer->QueuePointerEvent(PointerEventType::PointerReleased, e); + } +} + +void OpenGLESPage::OnKeyPressed(CoreWindow^ sender, KeyEventArgs^ e) +{ + if (!e->KeyStatus.WasKeyDown) + { + //log("OpenGLESPage::OnKeyPressed %d", e->VirtualKey); + if (m_renderer) + { + m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyPressed, e); + } + } +} + +void OpenGLESPage::OnCharacterReceived(CoreWindow^ sender, CharacterReceivedEventArgs^ e) +{ +#if 0 + if (!e->KeyStatus.WasKeyDown) + { + log("OpenGLESPage::OnCharacterReceived %d", e->KeyCode); + } +#endif +} + +void OpenGLESPage::OnKeyReleased(CoreWindow^ sender, KeyEventArgs^ e) +{ + //log("OpenGLESPage::OnKeyReleased %d", e->VirtualKey); + if (m_renderer) + { + m_renderer->QueueKeyboardEvent(WinRTKeyboardEventType::KeyReleased, e); + } +} + + +void OpenGLESPage::OnOrientationChanged(DisplayInformation^ sender, Object^ args) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + m_orientation = sender->CurrentOrientation; +} + +void OpenGLESPage::OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args) +{ + if (args->Visible && mRenderSurface != EGL_NO_SURFACE) + { + StartRenderLoop(); + } + else + { + StopRenderLoop(); + } +} + +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 +/* + We set args->Handled = true to prevent the app from quitting when the back button is pressed. + This is because this back button event happens on the XAML UI thread and not the cocos2d-x UI thread. + We need to give the game developer a chance to decide to exit the app depending on where they + are in their game. They can receive the back button event by listening for the + EventKeyboard::KeyCode::KEY_ESCAPE event. + + The default behavior is to exit the app if the EventKeyboard::KeyCode::KEY_ESCAPE event + is not handled by the game. +*/ +void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ args) +{ + if (m_renderer) + { + m_renderer->QueueBackButtonEvent(); + args->Handled = true; + } +} +#endif + + +void OpenGLESPage::OnSwapChainPanelSizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e) +{ + // Size change events occur outside of the render thread. A lock is required when updating + // the swapchainpanel size + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + mSwapChainPanelSize = { e->NewSize.Width, e->NewSize.Height }; +} + +void OpenGLESPage::GetSwapChainPanelSize(GLsizei* width, GLsizei* height) +{ + critical_section::scoped_lock lock(mSwapChainPanelSizeCriticalSection); + // If a custom render surface size is specified, return its size instead of + // the swapchain panel size. + if (mUseCustomRenderSurfaceSize) + { + *width = static_cast(mCustomRenderSurfaceSize.Width); + *height = static_cast(mCustomRenderSurfaceSize.Height); + } + else + { + *width = static_cast(mSwapChainPanelSize.Width); + *height = static_cast(mSwapChainPanelSize.Height); + } +} + +void OpenGLESPage::CreateRenderSurface() +{ + if (mOpenGLES && mRenderSurface == EGL_NO_SURFACE) + { + // + // A Custom render surface size can be specified by uncommenting the following lines. + // The render surface will be automatically scaled to fit the entire window. Using a + // smaller sized render surface can result in a performance gain. + // + //mCustomRenderSurfaceSize = Size(800, 600); + //mUseCustomRenderSurfaceSize = true; + + mRenderSurface = mOpenGLES->CreateSurface(swapChainPanel, mUseCustomRenderSurfaceSize ? &mCustomRenderSurfaceSize : nullptr); + } +} + +void OpenGLESPage::DestroyRenderSurface() +{ + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + } + mRenderSurface = EGL_NO_SURFACE; +} + +void OpenGLESPage::RecoverFromLostDevice() +{ + // Stop the render loop, reset OpenGLES, recreate the render surface + // and start the render loop again to recover from a lost device. + + StopRenderLoop(); + + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + DestroyRenderSurface(); + mOpenGLES->Reset(); + CreateRenderSurface(); + } + + StartRenderLoop(); +} + +void OpenGLESPage::TerminateApp() +{ + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + if (mOpenGLES) + { + mOpenGLES->DestroySurface(mRenderSurface); + mOpenGLES->Cleanup(); + } + + } + Windows::UI::Xaml::Application::Current->Exit(); +} + +void OpenGLESPage::StartRenderLoop() +{ + // If the render loop is already running then do not start another thread. + if (mRenderLoopWorker != nullptr && mRenderLoopWorker->Status == Windows::Foundation::AsyncStatus::Started) + { + return; + } + + DisplayInformation^ currentDisplayInformation = DisplayInformation::GetForCurrentView(); + m_dpi = currentDisplayInformation->LogicalDpi; + + auto dispatcher = Windows::UI::Xaml::Window::Current->CoreWindow->Dispatcher; + + // Create a task for rendering that will be run on a background thread. + auto workItemHandler = ref new Windows::System::Threading::WorkItemHandler([this, dispatcher](Windows::Foundation::IAsyncAction ^ action) + { + critical_section::scoped_lock lock(mRenderSurfaceCriticalSection); + + mOpenGLES->MakeCurrent(mRenderSurface); + + GLsizei panelWidth = 0; + GLsizei panelHeight = 0; + GetSwapChainPanelSize(&panelWidth, &panelHeight); + + if (m_renderer.get() == nullptr) + { + m_renderer = std::make_shared(panelWidth, panelHeight, m_dpi, m_orientation, dispatcher, swapChainPanel); + } + + if (m_deviceLost) + { + m_deviceLost = false; + m_renderer->DeviceLost(); + } + else + { + m_renderer->Resume(); + } + + + while (action->Status == Windows::Foundation::AsyncStatus::Started && !m_deviceLost) + { + GetSwapChainPanelSize(&panelWidth, &panelHeight); + m_renderer.get()->Draw(panelWidth, panelHeight, m_dpi, m_orientation); + + // run on main UI thread + if (m_renderer->AppShouldExit()) + { + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new DispatchedHandler([this]() + { + TerminateApp(); + })); + + return; + } + else if (mOpenGLES->SwapBuffers(mRenderSurface) != GL_TRUE) + { + // The call to eglSwapBuffers might not be successful (i.e. due to Device Lost) + // If the call fails, then we must reinitialize EGL and the GL resources. + + m_deviceLost = true; + + if (m_renderer) + { + m_renderer->Pause(); + } + + // XAML objects like the SwapChainPanel must only be manipulated on the UI thread. + swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]() + { + RecoverFromLostDevice(); + }, CallbackContext::Any)); + + return; + } + } + + if (m_renderer) + { + m_renderer->Pause(); + } + }); + + // Run task on a dedicated high priority background thread. + mRenderLoopWorker = Windows::System::Threading::ThreadPool::RunAsync(workItemHandler, Windows::System::Threading::WorkItemPriority::High, Windows::System::Threading::WorkItemOptions::TimeSliced); +} + +void OpenGLESPage::StopRenderLoop() +{ + if (mRenderLoopWorker) + { + mRenderLoopWorker->Cancel(); + mRenderLoopWorker = nullptr; + } +} \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h new file mode 100644 index 0000000000..26e3ff1fe0 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Cocos2dEngine/OpenGLESPage.xaml.h @@ -0,0 +1,85 @@ +/* +* cocos2d-x http://www.cocos2d-x.org +* +* Copyright (c) 2010-2014 - cocos2d-x community +* +* Portions Copyright (c) Microsoft Open Technologies, Inc. +* All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and limitations under the License. +*/ + +#pragma once + +#include "OpenGLES.h" +#include "OpenGLESPage.g.h" +#include + +#include "Cocos2dRenderer.h" + +namespace cocos2d +{ + public ref class OpenGLESPage sealed + { + public: + OpenGLESPage(); + virtual ~OpenGLESPage(); + + internal: + OpenGLESPage(OpenGLES* openGLES); + + private: + void OnPageLoaded(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void OnVisibilityChanged(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::VisibilityChangedEventArgs^ args); + void OnSwapChainPanelSizeChanged(Platform::Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e); +#if (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) || _MSC_VER >= 1900 + void OnBackButtonPressed(Platform::Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ args); +#endif + void GetSwapChainPanelSize(GLsizei* width, GLsizei* height); + void CreateRenderSurface(); + void DestroyRenderSurface(); + void RecoverFromLostDevice(); + void TerminateApp(); + void StartRenderLoop(); + void StopRenderLoop(); + + OpenGLES* mOpenGLES; + std::shared_ptr m_renderer; + + Windows::Foundation::Size mSwapChainPanelSize; + Concurrency::critical_section mSwapChainPanelSizeCriticalSection; + + Windows::Foundation::Size mCustomRenderSurfaceSize; + bool mUseCustomRenderSurfaceSize; + + EGLSurface mRenderSurface; // This surface is associated with a swapChainPanel on the page + Concurrency::critical_section mRenderSurfaceCriticalSection; + Windows::Foundation::IAsyncAction^ mRenderLoopWorker; + + // Track user input on a background worker thread. + Windows::Foundation::IAsyncAction^ m_inputLoopWorker; + Windows::UI::Core::CoreIndependentInputSource^ m_coreInput; + + // Independent input handling functions. + void OnPointerPressed(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnPointerMoved(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnPointerReleased(Platform::Object^ sender, Windows::UI::Core::PointerEventArgs^ e); + void OnKeyPressed(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnKeyReleased(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::KeyEventArgs^ args); + void OnCharacterReceived(Windows::UI::Core::CoreWindow^ sender, Windows::UI::Core::CharacterReceivedEventArgs^ args); + + void OnOrientationChanged(Windows::Graphics::Display::DisplayInformation^ sender, Platform::Object^ args); + + float m_dpi; + bool m_deviceLost; + Windows::Graphics::Display::DisplayOrientations m_orientation; + + }; +} diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj new file mode 100644 index 0000000000..1b86b135f8 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj @@ -0,0 +1,279 @@ + + + + {187d3e60-961a-41ee-bc18-c510a431d22e} + HelloCpp + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + HelloCpp_TemporaryKey.pfx + + + false + + + false + + + false + + + false + + + false + + + false + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + /bigobj /Zm200 %(AdditionalOptions) + 4453;28204;4251 + false + ..\..\Classes;Cocos2dEngine;Generated Files\Cocos2dEngine;%(AdditionalIncludeDirectories) + pch.h + ProgramDatabase + + + + + + + App.xaml + + + + + Cocos2dEngine\OpenGLESPage.xaml + + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + App.xaml + + + + + Cocos2dEngine\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + {ecee1119-ce2e-4f7e-83a8-1932ea48e893} + + + + + + + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters new file mode 100644 index 0000000000..801c0b28ff --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/HelloCpp.vcxproj.filters @@ -0,0 +1,88 @@ + + + + + 187d3e60-961a-41ee-bc18-c510a431d22e + + + f8868b9a-1bec-48df-b4b6-294815dc7a5d + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {6b9ca606-5a38-4479-a7ec-01bdfeda67bc} + + + {a18967bc-4fa1-4c67-bf7e-3f9c8b6a1129} + + + + + + + + + Cocos2dEngine + + + Cocos2dEngine + + + + + Classes + + + Classes + + + + + + Cocos2dEngine + + + Cocos2dEngine + + + + + Classes + + + Classes + + + + + Assets + + + + + + + + + + + + + + + + Cocos2dEngine + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx b/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx new file mode 100644 index 0000000000..76c0762f2c Binary files /dev/null and b/templates/cpp-template-default/proj.win10/App/HelloCpp_TemporaryKey.pfx differ diff --git a/templates/cpp-template-default/proj.win10/App/Package.appxmanifest b/templates/cpp-template-default/proj.win10/App/Package.appxmanifest new file mode 100644 index 0000000000..5dcf278215 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/Package.appxmanifest @@ -0,0 +1,52 @@ + + + + + + + + + + HelloCpp + "Microsoft Open Technologies, Inc." + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/cpp-template-default/proj.win10/App/pch.cpp b/templates/cpp-template-default/proj.win10/App/pch.cpp new file mode 100644 index 0000000000..bcb5590be1 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/templates/cpp-template-default/proj.win10/App/pch.h b/templates/cpp-template-default/proj.win10/App/pch.h new file mode 100644 index 0000000000..2e511d964f --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/pch.h @@ -0,0 +1,14 @@ +// +// pch.h +// Header for standard system include files. +// + +#pragma once + +#include +#include + +#include "cocos2d.h" +#include "cocos-ext.h" + + diff --git a/templates/cpp-template-default/proj.win10/App/resources.props b/templates/cpp-template-default/proj.win10/App/resources.props new file mode 100644 index 0000000000..044aa2eaa7 --- /dev/null +++ b/templates/cpp-template-default/proj.win10/App/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + + diff --git a/templates/cpp-template-default/proj.win10/HelloCpp.sln b/templates/cpp-template-default/proj.win10/HelloCpp.sln new file mode 100644 index 0000000000..4837cb2bbe --- /dev/null +++ b/templates/cpp-template-default/proj.win10/HelloCpp.sln @@ -0,0 +1,103 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.22823.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{B2F1FF1B-005C-490E-999E-17BD4B720B5C}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\cocos2d\external\Box2D\proj-win10\libbox2d.vcxproj", "{0C32D479-46D5-46C3-9AA9-0A8FF8320516}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win10\libSpine.vcxproj", "{4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\libcocos2d_win10\libcocos2d.vcxproj", "{07C2895D-720C-487D-B7B4-12C293EA533F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloCpp", "App\HelloCpp.vcxproj", "{187D3E60-961A-41EE-BC18-C510A431D22E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbullet", "..\cocos2d\external\bullet\proj.win10\libbullet.vcxproj", "{ECEE1119-CE2E-4F7E-83A8-1932EA48E893}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|ARM = Debug|ARM + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|ARM = Release|ARM + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.ActiveCfg = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|ARM.Build.0 = Debug|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.ActiveCfg = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x64.Build.0 = Debug|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.ActiveCfg = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Debug|x86.Build.0 = Debug|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.ActiveCfg = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|ARM.Build.0 = Release|ARM + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.ActiveCfg = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x64.Build.0 = Release|x64 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.ActiveCfg = Release|Win32 + {0C32D479-46D5-46C3-9AA9-0A8FF8320516}.Release|x86.Build.0 = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.ActiveCfg = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|ARM.Build.0 = Debug|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.ActiveCfg = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x64.Build.0 = Debug|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.ActiveCfg = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Debug|x86.Build.0 = Debug|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.ActiveCfg = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|ARM.Build.0 = Release|ARM + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.ActiveCfg = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x64.Build.0 = Release|x64 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.ActiveCfg = Release|Win32 + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8}.Release|x86.Build.0 = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.ActiveCfg = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|ARM.Build.0 = Debug|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.ActiveCfg = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x64.Build.0 = Debug|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.ActiveCfg = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Debug|x86.Build.0 = Debug|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.ActiveCfg = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|ARM.Build.0 = Release|ARM + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.ActiveCfg = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x64.Build.0 = Release|x64 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.ActiveCfg = Release|Win32 + {07C2895D-720C-487D-B7B4-12C293EA533F}.Release|x86.Build.0 = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.ActiveCfg = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.Build.0 = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|ARM.Deploy.0 = Debug|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.ActiveCfg = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.Build.0 = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x64.Deploy.0 = Debug|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.ActiveCfg = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.Build.0 = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Debug|x86.Deploy.0 = Debug|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.ActiveCfg = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.Build.0 = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|ARM.Deploy.0 = Release|ARM + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.ActiveCfg = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.Build.0 = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x64.Deploy.0 = Release|x64 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.ActiveCfg = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.Build.0 = Release|Win32 + {187D3E60-961A-41EE-BC18-C510A431D22E}.Release|x86.Deploy.0 = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.ActiveCfg = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|ARM.Build.0 = Debug|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.ActiveCfg = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x64.Build.0 = Debug|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.ActiveCfg = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Debug|x86.Build.0 = Debug|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.ActiveCfg = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|ARM.Build.0 = Release|ARM + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.ActiveCfg = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x64.Build.0 = Release|x64 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.ActiveCfg = Release|Win32 + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {0C32D479-46D5-46C3-9AA9-0A8FF8320516} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + {4B3BA10A-941F-4E08-8A50-8A7FCB822BB8} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + {ECEE1119-CE2E-4F7E-83A8-1932EA48E893} = {B2F1FF1B-005C-490E-999E-17BD4B720B5C} + EndGlobalSection +EndGlobal diff --git a/tests/cpp-empty-test/proj.win10/App.xaml b/tests/cpp-empty-test/proj.win10/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/tests/cpp-empty-test/proj.win10/App.xaml.cpp b/tests/cpp-empty-test/proj.win10/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/tests/cpp-empty-test/proj.win10/App.xaml.h b/tests/cpp-empty-test/proj.win10/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/Logo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/SmallLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/SplashScreen.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/StoreLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png b/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/Assets/WideLogo.scale-100.png differ diff --git a/tests/cpp-empty-test/proj.win10/Package.appxmanifest b/tests/cpp-empty-test/proj.win10/Package.appxmanifest new file mode 100644 index 0000000000..ebbd470724 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/Package.appxmanifest @@ -0,0 +1,30 @@ + + + + + + cpp-empty-test + Microsoft Open Technologies, Inc. + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj new file mode 100644 index 0000000000..f042b8597e --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj @@ -0,0 +1,350 @@ + + + + {87ed86e7-a850-433f-88d5-d5f65cff7bf5} + cpp_empty_test + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cpp-empty-test_TemporaryKey.pfx + False + x86 + + + false + + + false + + + false + + + false + + + false + + + false + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + ProgramDatabase + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + OldStyle + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + EditAndContinue + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + false + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + + + echo "Copying Windows 8.1 Universal App CPP template files" +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLESPage.xaml.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\OpenGLES.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\Cocos2dRenderer.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\Cocos2dEngine\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.cpp" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq +xcopy "$(EngineRoot)cocos\platform\win8.1-universal\pch.h" "$(EngineRoot)templates\cpp-template-default\proj.win10\App\*" /eiycq + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + + + + + App.xaml + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + App.xaml + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters new file mode 100644 index 0000000000..61bd275564 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/cpp-empty-test.vcxproj.filters @@ -0,0 +1,75 @@ + + + + + 3d6eacf1-453c-497e-abc1-ba958539b0a5 + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {482632c3-0bc4-4037-b656-2646b14d761f} + + + + + + + + + Classes + + + Classes + + + + + + + + + + Classes + + + Classes + + + Classes + + + + + + + + + Assets + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx b/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx new file mode 100644 index 0000000000..8eec023cfc Binary files /dev/null and b/tests/cpp-empty-test/proj.win10/cpp-empty-test_TemporaryKey.pfx differ diff --git a/tests/cpp-empty-test/proj.win10/resources.props b/tests/cpp-empty-test/proj.win10/resources.props new file mode 100644 index 0000000000..27ed663949 --- /dev/null +++ b/tests/cpp-empty-test/proj.win10/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + + diff --git a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp index dd35fe5e95..e6b6e73279 100644 --- a/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp +++ b/tests/cpp-tests/Classes/ExtensionsTest/ExtensionsTest.cpp @@ -1,6 +1,9 @@ #include "ExtensionsTest.h" #include "../testResource.h" +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) +// Window 10 UWP does not yet support CURL #include "AssetsManagerExTest/AssetsManagerExTest.h" +#endif #include "NotificationCenterTest/NotificationCenterTest.h" #include "ControlExtensionTest/CCControlSceneManager.h" #include "CocosBuilderTest/CocosBuilderTest.h" @@ -21,7 +24,10 @@ ExtensionsTests::ExtensionsTests() { +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + // Window 10 UWP does not yet support CURL addTest("AssetsManagerExTest", [](){ return new (std::nothrow) AssetsManagerExTests; }); +#endif addTest("NotificationCenterTest", [](){ return new (std::nothrow) NotificationCenterTests; }); addTest("CCControlButtonTest", [](){ return new (std::nothrow) ControlTests; }); addTest("CocosBuilderTest", [](){ return new (std::nothrow) CocosBuilderTests; }); diff --git a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp index 9bf0008120..bdac37c43a 100644 --- a/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp +++ b/tests/cpp-tests/Classes/MaterialSystemTest/MaterialSystemTest.cpp @@ -119,22 +119,22 @@ void Material_2DEffects::onEnter() Material *mat1 = Material::createWithProperties(properties); auto spriteBlur = Sprite::create("Images/grossini.png"); - spriteBlur->setNormalizedPosition(Vec2(0.2, 0.5)); + spriteBlur->setNormalizedPosition(Vec2(0.2f, 0.5f)); this->addChild(spriteBlur); spriteBlur->setGLProgramState(mat1->getTechniqueByName("blur")->getPassByIndex(0)->getGLProgramState()); auto spriteOutline = Sprite::create("Images/grossini.png"); - spriteOutline->setNormalizedPosition(Vec2(0.4, 0.5)); + spriteOutline->setNormalizedPosition(Vec2(0.4f, 0.5f)); this->addChild(spriteOutline); spriteOutline->setGLProgramState(mat1->getTechniqueByName("outline")->getPassByIndex(0)->getGLProgramState()); auto spriteNoise = Sprite::create("Images/grossini.png"); - spriteNoise->setNormalizedPosition(Vec2(0.6, 0.5)); + spriteNoise->setNormalizedPosition(Vec2(0.6f, 0.5f)); this->addChild(spriteNoise); spriteNoise->setGLProgramState(mat1->getTechniqueByName("noise")->getPassByIndex(0)->getGLProgramState()); auto spriteEdgeDetect = Sprite::create("Images/grossini.png"); - spriteEdgeDetect->setNormalizedPosition(Vec2(0.8, 0.5)); + spriteEdgeDetect->setNormalizedPosition(Vec2(0.8f, 0.5f)); this->addChild(spriteEdgeDetect); spriteEdgeDetect->setGLProgramState(mat1->getTechniqueByName("edge_detect")->getPassByIndex(0)->getGLProgramState()); diff --git a/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index 93a04b2f07..bdd532f22a 100644 --- a/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/tests/cpp-tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -461,7 +461,7 @@ std::string LabelKeyboardEventTest::title() const std::string LabelKeyboardEventTest::subtitle() const { - return "Please click keyboard\n(Only available on Desktop and Android)"; + return "Please click keyboard\n(Only available on Desktop, Android\nand Windows Universal Apps)"; } // SpriteAccelerationEventTest diff --git a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp index c599ff06af..c4441e7099 100644 --- a/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp +++ b/tests/cpp-tests/Classes/PhysicsTest/PhysicsTest.cpp @@ -962,7 +962,7 @@ void PhysicsDemoPump::onEnter() bgearB->setCategoryBitmask(0x04); _world->addJoint(PhysicsJointPin::construct(bgearB, body, bgear->getPosition())); - _world->addJoint(PhysicsJointGear::construct(sgearB, bgearB, -M_PI_2, -2.0f)); + _world->addJoint(PhysicsJointGear::construct(sgearB, bgearB, (float)-M_PI_2, -2.0f)); // plugger Vec2 seg[] = {VisibleRect::leftTop() + Vec2(75, -120), VisibleRect::leftBottom() + Vec2(75, -100)}; diff --git a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp index ee81868699..0ba23eedba 100644 --- a/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp +++ b/tests/cpp-tests/Classes/Sprite3DTest/Sprite3DTest.cpp @@ -2074,7 +2074,7 @@ void QuaternionTest::addNewSpriteWithCoords(Vec2 p) void QuaternionTest::update(float delta) { _accAngle += delta * _arcSpeed; - const float pi = M_PI; + const float pi = (float)M_PI; if (_accAngle >= 2 * pi) _accAngle -= 2 * pi; diff --git a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp index 147b6f28ca..0a225e5dd1 100644 --- a/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp +++ b/tests/cpp-tests/Classes/TerrainTest/TerrainTest.cpp @@ -16,9 +16,9 @@ TerrainSimple::TerrainSimple() Size visibleSize = Director::getInstance()->getVisibleSize(); //use custom camera - _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1,800); + _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1f,800); _camera->setCameraFlag(CameraFlag::USER1); - _camera->setPosition3D(Vec3(-1,1.6,4)); + _camera->setPosition3D(Vec3(-1,1.6f,4)); addChild(_camera); Terrain::DetailMap r("TerrainTest/dirt.jpg"),g("TerrainTest/Grass2.jpg"),b("TerrainTest/road.jpg"),a("TerrainTest/GreenSkin.jpg"); @@ -26,7 +26,7 @@ TerrainSimple::TerrainSimple() Terrain::TerrainData data("TerrainTest/heightmap16.jpg","TerrainTest/alphamap.png",r,g,b,a); _terrain = Terrain::create(data,Terrain::CrackFixedType::SKIRT); - _terrain->setLODDistance(3.2,6.4,9.6); + _terrain->setLODDistance(3.2f,6.4f,9.6f); _terrain->setMaxDetailMapAmount(4); addChild(_terrain); _terrain->setCameraMask(2); @@ -95,7 +95,7 @@ TerrainWalkThru::TerrainWalkThru() Size visibleSize = Director::getInstance()->getVisibleSize(); //use custom camera - _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1,200); + _camera = Camera::createPerspective(60,visibleSize.width/visibleSize.height,0.1f,200); _camera->setCameraFlag(CameraFlag::USER1); addChild(_camera); @@ -111,7 +111,7 @@ TerrainWalkThru::TerrainWalkThru() _terrain->setLODDistance(64,128,192); _player = Player::create("Sprite3DTest/girl.c3b",_camera,_terrain); _player->setCameraMask(2); - _player->setScale(0.08); + _player->setScale(0.08f); _player->setPositionY(_terrain->getHeight(_player->getPositionX(),_player->getPositionZ())+PLAYER_HEIGHT); // add Particle3D for test blend @@ -255,7 +255,7 @@ void Player::update(float dt) player->setPositionY(player_h+PLAYER_HEIGHT); Quaternion q2; - q2.createFromAxisAngle(Vec3(0,1,0),-M_PI,&q2); + q2.createFromAxisAngle(Vec3(0,1,0),(float)-M_PI,&q2); Quaternion headingQ; headingQ.createFromAxisAngle(_headingAxis,_headingAngle,&headingQ); diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp index 84c99a8558..ba91c867db 100644 --- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp +++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UILayoutTest/UILayoutTest_Editor.cpp @@ -523,7 +523,7 @@ void UILayoutComponentTest_Editor::onResizeContainer(Ref* sender) switchButton->setEnabled(true); switchButton->setBright(true); } - }, 0.025, 39, 0, "1"); + }, 0.025f, 39, 0, "1"); } else { @@ -539,6 +539,6 @@ void UILayoutComponentTest_Editor::onResizeContainer(Ref* sender) switchButton->setEnabled(true); switchButton->setBright(true); } - }, 0.025, 39, 0, "2"); + }, 0.025f, 39, 0, "2"); } } diff --git a/tests/cpp-tests/Classes/controller.cpp b/tests/cpp-tests/Classes/controller.cpp index 8baf84845c..7502565af4 100644 --- a/tests/cpp-tests/Classes/controller.cpp +++ b/tests/cpp-tests/Classes/controller.cpp @@ -35,7 +35,10 @@ public: addTest("Click and Move", [](){return new ClickAndMoveTest(); }); addTest("Configuration", []() { return new ConfigurationTests(); }); addTest("Console", []() { return new ConsoleTests(); }); +#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT && _MSC_VER < 1900) + // Window 10 UWP does not yet support CURL addTest("Curl", []() { return new CurlTests(); }); +#endif addTest("Current Language", []() { return new CurrentLanguageTests(); }); addTest("CocosStudio3D Test", []() { return new CocosStudio3DTests(); }); addTest("EventDispatcher", []() { return new EventDispatcherTests(); }); diff --git a/tests/cpp-tests/proj.win10/App.xaml b/tests/cpp-tests/proj.win10/App.xaml new file mode 100644 index 0000000000..62de149dd6 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml @@ -0,0 +1,7 @@ + + + diff --git a/tests/cpp-tests/proj.win10/App.xaml.cpp b/tests/cpp-tests/proj.win10/App.xaml.cpp new file mode 100644 index 0000000000..f702179939 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml.cpp @@ -0,0 +1,21 @@ +#include "App.xaml.h" +#include "OpenGLESPage.xaml.h" + +using namespace cocos2d; + +App::App() +{ + InitializeComponent(); +} + +void App::OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) +{ + if (mPage == nullptr) + { + mPage = ref new OpenGLESPage(&mOpenGLES); + } + + // Place the page in the current window and ensure that it is active. + Windows::UI::Xaml::Window::Current->Content = mPage; + Windows::UI::Xaml::Window::Current->Activate(); +} diff --git a/tests/cpp-tests/proj.win10/App.xaml.h b/tests/cpp-tests/proj.win10/App.xaml.h new file mode 100644 index 0000000000..8697d3d824 --- /dev/null +++ b/tests/cpp-tests/proj.win10/App.xaml.h @@ -0,0 +1,19 @@ +#pragma once + +#include "app.g.h" +#include "OpenGLES.h" +#include "openglespage.xaml.h" + +namespace cocos2d +{ + ref class App sealed + { + public: + App(); + virtual void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs^ e) override; + + private: + OpenGLESPage^ mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png new file mode 100644 index 0000000000..e26771cb33 Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/Logo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png new file mode 100644 index 0000000000..1eb0d9d528 Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/SmallLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png b/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png new file mode 100644 index 0000000000..c951e031bd Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/SplashScreen.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png new file mode 100644 index 0000000000..dcb672712c Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/StoreLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png b/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png new file mode 100644 index 0000000000..9dd94b628c Binary files /dev/null and b/tests/cpp-tests/proj.win10/Assets/WideLogo.scale-100.png differ diff --git a/tests/cpp-tests/proj.win10/Package.appxmanifest b/tests/cpp-tests/proj.win10/Package.appxmanifest new file mode 100644 index 0000000000..1a3dabe758 --- /dev/null +++ b/tests/cpp-tests/proj.win10/Package.appxmanifest @@ -0,0 +1,30 @@ + + + + + + cpp-tests + Microsoft Open Technologies, Inc. + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests.vcxproj b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj new file mode 100644 index 0000000000..ecee9bdf58 --- /dev/null +++ b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj @@ -0,0 +1,742 @@ + + + + {c1307b42-d00a-4b88-bcdd-0a16a81ff4c1} + cpp_tests + en-US + 14.0 + true + Windows Store + 8.2 + + + + + Debug + ARM + + + Debug + Win32 + + + Debug + x64 + + + Release + ARM + + + Release + Win32 + + + Release + x64 + + + + Application + true + v140 + + + Application + true + v140 + + + Application + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + Application + false + true + v140 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + cpp-tests_TemporaryKey.pfx + False + x86 + + + false + + + false + + + false + + + false + + + false + + + false + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + ProgramDatabase + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056;4800; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + EditAndContinue + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) + + + + + /Zm384 /bigobj %(AdditionalOptions) + 4453;28204;4251;4244;4056; + pch.h + ..\Classes;$(EngineRoot)cocos\platform\win8.1-universal;%(AdditionalIncludeDirectories) + false + false + CC_ENABLE_CHIPMUNK_INTEGRATION=1;CC_ENABLE_BULLET_INTEGRATION=1;%(PreprocessorDefinitions) + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.xaml + + + + + Designer + + + + + Designer + + + + + + + + + + + + + + + ..\..\..\cocos\platform\win8.1-universal\OpenGLESPage.xaml + + + Create + Create + Create + Create + Create + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + App.xaml + + + + + {07c2895d-720c-487d-b7b4-12c293ea533f} + + + {4b3ba10a-941f-4e08-8a50-8a7fcb822bb8} + + + {0c32d479-46d5-46c3-9aa9-0a8ff8320516} + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters new file mode 100644 index 0000000000..038cf9ce01 --- /dev/null +++ b/tests/cpp-tests/proj.win10/cpp-tests.vcxproj.filters @@ -0,0 +1,1782 @@ + + + + + 97d8d08c-848a-420e-aab1-5061457b491f + bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png + + + Assets + + + Assets + + + Assets + + + Assets + + + {72a5938d-b456-4ee5-a76a-5e28c0cf30b5} + + + {81d00d76-81ec-4274-8e14-0066561a59f3} + + + {12320dbd-8679-44e8-b002-10cfd1f0ab8d} + + + {ec79851d-4b4e-4cca-a60a-db3bd19e9df0} + + + {c71ed4ef-b44c-4efa-a557-96d792c4082f} + + + {a762d21f-dab4-4e65-9635-8a2d1c3720a5} + + + {ff2c6e21-2e15-47ba-8e8a-d32db4c4bd7d} + + + {bddbff12-4011-4071-86c3-d2d4b01d9f07} + + + {142a60f8-f519-453f-9641-13c42af61fbc} + + + {0a14dee6-42c3-4144-a086-30bcae298e81} + + + {36c8d894-0028-4d9a-b9c1-3d2b121630da} + + + {ef5441af-f919-4af7-b130-f69ad71bf475} + + + {1a800ef0-fbc5-47ad-903d-48cb2e6e884a} + + + {e05a72bb-7eed-46a8-8216-1714220c79bf} + + + {6990fa3c-1895-48ec-9823-c82132260315} + + + {4264a752-8ba3-4123-a8e4-10099dc9cf7f} + + + {440a9c5a-db16-4c28-99ee-58ff0f719ba2} + + + {d73c786c-4cfe-4e17-9d9a-322375186ec7} + + + {4fdbcbde-1a04-49bc-a560-0b23a61c9850} + + + {583443c6-166b-4693-a2d1-ad846f6813bc} + + + {54e78cdc-cc15-4d83-8d3c-ff77beae1446} + + + {8e16d7fe-b605-4eaf-9474-ec8a1298abdc} + + + {e5b0399b-acae-4f23-9a37-063323e86386} + + + {afcfb524-ce73-49ba-89ce-cb99287eda6c} + + + {8a60f5bf-9873-44fc-aa4d-29056ae1c370} + + + {d8bbe73e-03bd-4262-b49f-402a14f8a13d} + + + {8a4d0c1b-0951-4965-8740-e430dde2fbe8} + + + {0bf42589-4ced-4603-a901-e773767d83f7} + + + {ff1dcf6c-41df-4b5c-aa35-80f52ecc34eb} + + + {7fda7040-9402-4f45-b141-22a74978c3d2} + + + {64eae2a4-f1f2-4d57-af0e-f417669bf6ab} + + + {9f2342f7-9cfa-4897-8610-5aba7d2a8eda} + + + {618404c5-9e20-4c6b-ba9c-11699ba3c45c} + + + {a6a92123-dd2f-4c1e-9780-a8183491b3d2} + + + {ee4418eb-5a74-4ba6-a3d9-361793492383} + + + {50348955-c1df-4e27-ba81-7f1f7a7f7d0b} + + + {a3022a16-5125-46fe-bbbf-88b6327fdf90} + + + {c182d51b-571a-41b9-93c4-2f16a9a6e382} + + + {24c2bc37-1b31-4844-981f-d0b842636df1} + + + {a8c99d83-bb5b-4732-9654-5c4a46833584} + + + {df4917f4-0ed9-483b-9133-71d60ba8a4fd} + + + {0648a349-fa88-45e2-8304-58576ac063b2} + + + {a52b46b5-e7f9-4780-938f-98e58d702db3} + + + {1a5d3f8b-3643-47e1-a6d9-7dad49dcb624} + + + {ae687fa8-7a8d-4b9c-9618-3191c9be1927} + + + {b39e1877-a9c0-4c7c-acc9-a685ad2daf3b} + + + {53ec3574-9cb7-4e7b-af67-e7f7f9e6a0e6} + + + {3a131364-6664-4c15-a66e-2dbdf2b296b9} + + + {8d4ad0bf-81d4-4767-ac71-39b5c75b72ba} + + + {d93b735e-696c-43b7-9a79-993ca680b953} + + + {19e37819-45ae-474d-86d9-46104d51e247} + + + {aa8d908d-05dd-4dd3-9cd7-1a381e167ba8} + + + {6a181335-c139-4928-84f0-40c3373befb8} + + + {6135b950-f660-4f73-8c40-bbc31c6e2863} + + + {43e4143b-0be4-4800-9cd3-9293bb1006ce} + + + {1716fd6e-cd96-4bea-96d0-37d57dd602c5} + + + {718a904b-d90b-4aa0-944f-81a69d287ea5} + + + {1ec92552-3f16-4080-ba2f-a171b3a7f92c} + + + {cf755f22-4dbd-427a-b92a-f7ef14f72990} + + + {8240d810-c3a1-403c-8d60-f83ca945bf34} + + + {f2357ab1-759e-42fa-87f3-1e33a775c912} + + + {c84d9ab4-0f15-4a7e-b214-238249f06204} + + + {e45b72a6-fe38-4c7a-986a-424d303b847f} + + + {7ec771c0-0344-43e9-9ae8-0f8a278791a2} + + + {878bc3fc-cc88-43cb-85b7-f64c31c527b6} + + + {340b2acb-098d-441d-9737-6788ea17541a} + + + {ff68b4b0-3bdf-4813-8552-b79af838c8a3} + + + {a60b411f-fae8-461b-afe7-8e8033d2153c} + + + {4d8e2aef-dfcc-45f6-a027-8aea00cafa29} + + + {82b1b84a-5a70-4309-a1bc-5bed28b93fca} + + + {f796e4f7-2eb3-4692-8c9c-235210efed10} + + + {6d95ed56-5c1c-46d3-9e80-79240ebd5072} + + + {bfb4a411-50bc-4c85-a672-e36f3cbc81b7} + + + {128e1a02-7a70-4b1e-940d-3ff988396f58} + + + {44105a0d-741e-48b5-9d78-0402eec04cfc} + + + {c278bd7b-bfd0-4f93-b080-68276c138f64} + + + {bdf10730-fe07-490e-8494-421b4a73f708} + + + {67e286b7-a1a6-49c2-ad15-6cdc9ed53007} + + + {314aae2a-4e9f-40d3-96a7-6792101fbc83} + + + {ab6bb602-44bb-49dc-8bf7-b1a894a51281} + + + {9601d114-2994-4921-aa77-68b5d5dda079} + + + {9697d5ba-4925-4f8a-b03c-f6e077bb235e} + + + {2c6bf95b-0dc3-4dd1-9261-b09abbf7a5ef} + + + {8ee0bd19-66cb-44af-8909-148cea32993e} + + + {87d01b39-db32-43ea-a3b7-fa78270496f2} + + + {6e5ff90e-737d-4fed-83c4-4019f1cdbfd0} + + + {4ce89c31-a7c7-4f75-8ba2-20728bec004c} + + + {10f3d541-41ea-423a-b299-a7cd56831c67} + + + {ac122973-5abd-4170-8c04-2fe623c34b0b} + + + {aa6b6c58-a9e1-432c-9752-8a8ecab14af6} + + + {c5823b1e-ba02-4371-8d45-279252a56fd4} + + + {b66c0e30-ce97-4366-98e7-61b6e8d167d3} + + + {4e7d6608-39de-4031-8f21-606927329eb2} + + + {ba9c4da6-6f31-49fe-b873-62dcff471d92} + + + {ccc87a7c-9e62-4035-a4c5-f7a5880139a8} + + + {8d6fe7eb-ba6c-4cea-93b2-1adaf2c8e2ae} + + + {dd49a12b-b5dd-415e-9a98-7b63a46b9028} + + + {96b173ca-93d1-4d81-8df4-c958f51e606f} + + + {e4ee8bfa-2eac-4778-bfb5-006fc95020b5} + + + {119e04c5-5d54-4972-aeb8-9bb32f7a33ac} + + + {04b6873a-ec2a-4695-80b5-df70a54a37d5} + + + {3df38e07-ce63-44fa-900b-e20d39848bad} + + + {e5a446a6-fee6-4802-952b-eb18a397f446} + + + {16c5df56-4880-4bf2-a626-fc8974cd9df3} + + + {5e03116b-9f99-4db3-808a-b36aaae5dae0} + + + {baf5dbe8-8801-4333-a8c2-6f96fbe31b5d} + + + {11da21cc-bd40-4f2c-8bf9-5056772f1ba0} + + + {733a8fe7-3fee-43e8-9437-d220158bb48b} + + + {ac191442-d014-4327-84cc-e31d233cb5ed} + + + {684498f9-817b-4058-a932-0cd4d9cde9eb} + + + {8af92cb5-8107-4998-8fa8-f7e959146a06} + + + {62e7ccf1-beeb-4f93-b069-5a81e62776a4} + + + {2d74d632-649d-4d94-bf6a-cfa01315a5b0} + + + {82556440-cf2a-45b7-8a23-718c25ad9007} + + + {842b8441-0677-46fd-ac69-effbe83b0776} + + + {ea7e291b-1de5-4be5-9f59-c92dfcb5dac5} + + + {b1107d06-46fc-4b73-9776-8d8c988aba40} + + + {cef7e8dc-ebcd-4eab-ad0a-1e885fa26373} + + + {b70087b3-b070-48f9-9be0-41226092dcb8} + + + {f10b76ee-8c87-4b9f-b8af-ace7a38bb6f2} + + + {568809dd-eb65-4bb2-90d2-251313e5b67e} + + + {1830aea4-07f5-466e-928c-a67a02083535} + + + {a34bc185-d0fa-4e93-b289-954abaedcaae} + + + + + + + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionManagerTest + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\AllocatorTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\CocosStudio3DTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\FileUtilsTest + + + Classes\InputTest + + + Classes\FontTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\Particle3DTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TerrainTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest\CocostudioParserTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UIFocusTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIRichTextTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + + + + + Classes\SpritePolygonTest + + + Classes\Scene3DTest + + + Classes\MaterialSystemTest + + + Classes\NewAudioEngineTest + + + Classes\Physics3DTest + + + + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes + + + Classes\ActionManagerTest + + + Classes\ActionsEaseTest + + + Classes\ActionsProgressTest + + + Classes\ActionsTest + + + Classes\AllocatorTest + + + Classes\BillBoardTest + + + Classes\Box2DTest + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\Box2DTestBed\Tests + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest + + + Classes\BugsTest\Bug-458 + + + Classes\BugsTest\Bug-458 + + + Classes\Camera3DTest + + + Classes\ChipmunkTest + + + Classes\ClickAndMoveTest + + + Classes\ClippingNodeTest + + + Classes\CocosDenshionTest + + + Classes\CocosStudio3DTest + + + Classes\ConfigurationTest + + + Classes\ConsoleTest + + + Classes\CurrentLanguageTest + + + Classes\DataVisitorTest + + + Classes\DrawPrimitivesTest + + + Classes\EffectsAdvancedTest + + + Classes\EffectsTest + + + Classes\ExtensionsTest + + + Classes\ExtensionsTest\CocosBuilderTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\AnimationsTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\ButtonTest + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\HelloCocosBuilder + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\LabelTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\MenuTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ParticleSystemTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocosBuilderTest\ScrollViewTest + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\SpriteTest + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TestHeader + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocosBuilderTest\TimelineCallbackTest + + + Classes\ExtensionsTest\CocoStudioActionTimelineTest + + + Classes\ExtensionsTest\CocoStudioArmatureTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioComponentsTest + + + Classes\ExtensionsTest\CocoStudioSceneTest + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\CocoStudioSceneTest\TriggerCode + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlButtonTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlColourPicker + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlPotentiometerTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSliderTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlStepperTest + + + Classes\ExtensionsTest\ControlExtensionTest\CCControlSwitchTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NetworkTest + + + Classes\ExtensionsTest\NotificationCenterTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\ExtensionsTest\TableViewTest + + + Classes\FileUtilsTest + + + Classes\InputTest + + + Classes\FontTest + + + Classes\IntervalTest + + + Classes\LabelTest + + + Classes\LabelTest + + + Classes\LayerTest + + + Classes\LightTest + + + Classes\MenuTest + + + Classes\MotionStreakTest + + + Classes\MutiTouchTest + + + Classes\NewEventDispatcherTest + + + Classes\NewRendererTest + + + Classes\NodeTest + + + Classes\OpenURLTest + + + Classes\ParallaxTest + + + Classes\Particle3DTest + + + Classes\ParticleTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PerformanceTest + + + Classes\PhysicsTest + + + Classes\ReleasePoolTest + + + Classes\RenderTextureTest + + + Classes\RotateWorldTest + + + Classes\SceneTest + + + Classes\SchedulerTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\ShaderTest + + + Classes\SpineTest + + + Classes\Sprite3DTest + + + Classes\Sprite3DTest + + + Classes\SpriteTest + + + Classes\TerrainTest + + + Classes\TextInputTest + + + Classes\Texture2dTest + + + Classes\TextureCacheTest + + + Classes\TexturePackerEncryptionTest + + + Classes\TileMapTest + + + Classes\TileMapTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TouchesTest + + + Classes\TransitionsTest + + + Classes\UITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest + + + Classes\UITest\CocoStudioGUITest\CocostudioParserTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomImageTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomParticleWidgetTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomTest\CustomWidgetCallbackBindTest + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\CustomWidget + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UIButtonTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UICheckBoxTest + + + Classes\UITest\CocoStudioGUITest\UIFocusTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UIImageViewTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UILayoutTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UIListViewTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UILoadingBarTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIPageViewTest + + + Classes\UITest\CocoStudioGUITest\UIRichTextTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UIScrollViewTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UISliderTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextAtlasTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextBMFontTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextFieldTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UITextTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UITest\CocoStudioGUITest\UIWidgetAddNodeTest + + + Classes\UnitTest + + + Classes\UnitTest + + + Classes\UserDefaultTest + + + Classes\ZwoptexTest + + + + + + + Classes\SpritePolygonTest + + + Classes\Scene3DTest + + + Classes\MaterialSystemTest + + + Classes\NewAudioEngineTest + + + Classes\Physics3DTest + + + + + Assets + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx b/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx new file mode 100644 index 0000000000..908e16588f Binary files /dev/null and b/tests/cpp-tests/proj.win10/cpp-tests_TemporaryKey.pfx differ diff --git a/tests/cpp-tests/proj.win10/resources.props b/tests/cpp-tests/proj.win10/resources.props new file mode 100644 index 0000000000..27ed663949 --- /dev/null +++ b/tests/cpp-tests/proj.win10/resources.props @@ -0,0 +1,19 @@ + + + + + + <_CustomResource Include="..\Resources\**\*"> + Assets\Resources\%(RecursiveDir)%(FileName)%(Extension) + true + + + + + + + + + + +