mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Merge pull request #22 from WenhaiLin/master
Fixed compile fail on window
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2013
|
||||
VisualStudioVersion = 12.0.31101.0
|
||||
MinimumVisualStudioVersion = 12.0.21005.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "External", "External", "{92D54E36-7916-48EF-A951-224DD3B25442}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjscocos2d", "..\cocos\scripting\js-bindings\proj.win32\libjscocos2d.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|ARM = Release|ARM
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|ARM.ActiveCfg = Debug|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|ARM.ActiveCfg = Release|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442}
|
||||
EndGlobalSection
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -70,7 +70,7 @@ bool ShakyTiles3D::initWithDuration(float duration, const Size& gridSize, int ra
|
||||
ShakyTiles3D* ShakyTiles3D::clone() const
|
||||
{
|
||||
// no copy constructor
|
||||
return ShakyTiles3D::create(_duration, _gridSize, _randrange, -_shakeZ);
|
||||
return ShakyTiles3D::create(_duration, _gridSize, _randrange, _shakeZ);
|
||||
}
|
||||
|
||||
void ShakyTiles3D::update(float time)
|
||||
|
||||
@@ -1111,7 +1111,7 @@ void Label::enableBold()
|
||||
if (!_boldEnabled)
|
||||
{
|
||||
// bold is implemented with outline
|
||||
enableShadow(Color4B::WHITE, Size(0.9,0), 0);
|
||||
enableShadow(Color4B::WHITE, Size(0.9f, 0), 0);
|
||||
// add one to kerning
|
||||
setAdditionalKerning(_additionalKerning+1);
|
||||
_boldEnabled = true;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)external\win32\include;$(EngineRoot)cocos;$(EngineRoot)cocos\platform;$(EngineRoot)external\sources;$(EngineRoot)cocos\editor-support</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)external\win32\include;$(EngineRoot)cocos\platform;$(EngineRoot)external\sources;$(EngineRoot)cocos\editor-support;$(EngineRoot)external\win32\include\zlib;$(EngineRoot)external\win32\include\freetype</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<ProjectReference>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<Link>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libwebp.lib;libiconv.lib;freetype.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libiconv.lib;freetype.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LibraryPath>../../external/sqlite3/libraries/win32;$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath>$(EngineRoot)external\win32\libs;$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LibraryPath>../../external/sqlite3/libraries/win32;$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
|
||||
@@ -75,7 +75,7 @@
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)extensions;$(EngineRoot)external\win32\include\zlib;$(EngineRoot)external\win32\include\freetype2;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_USRDLL;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_USE3DDLL;_EXPORT_DLL_;_USRSTUDIODLL;_USREXDLL;_USEGUIDLL;CC_ENABLE_CHIPMUNK_INTEGRATION=1;PROTOBUF_USE_DLLS;LIBPROTOBUF_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
@@ -214,6 +214,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClCompile Include="..\base\CCRef.cpp" />
|
||||
<ClCompile Include="..\base\CCScheduler.cpp" />
|
||||
<ClCompile Include="..\base\CCScriptSupport.cpp" />
|
||||
<ClCompile Include="..\base\CCStencilStateManager.cpp" />
|
||||
<ClCompile Include="..\base\CCString.cpp" />
|
||||
<ClCompile Include="..\base\CCTouch.cpp" />
|
||||
<ClCompile Include="..\base\ccTypes.cpp" />
|
||||
@@ -256,6 +257,24 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkeletonNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmature.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureAnimation.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureDataManager.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureDefine.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCBatchNode.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCBone.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCColliderDetector.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDataReaderHelper.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDatas.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDecorativeDisplay.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDisplayFactory.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDisplayManager.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCProcessBase.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCSkin.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCSpriteFrameCacheHelper.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCTransformHelp.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCTween.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCUtilMath.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\CCActionFrame.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\CCActionFrameEasing.cpp" />
|
||||
<ClCompile Include="..\editor-support\cocostudio\CCActionManagerEx.cpp" />
|
||||
@@ -324,6 +343,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClCompile Include="..\ui\UIButton.cpp" />
|
||||
<ClCompile Include="..\ui\UIAbstractCheckButton.cpp" />
|
||||
<ClCompile Include="..\ui\UICheckBox.cpp" />
|
||||
<ClCompile Include="..\ui\UIPageViewIndicator.cpp" />
|
||||
<ClCompile Include="..\ui\UIRadioButton.cpp" />
|
||||
<ClCompile Include="..\ui\UIEditBox\UIEditBox.cpp" />
|
||||
<ClCompile Include="..\ui\UIEditBox\UIEditBoxImpl-win32.cpp" />
|
||||
@@ -488,6 +508,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClInclude Include="..\base\CCRefPtr.h" />
|
||||
<ClInclude Include="..\base\CCScheduler.h" />
|
||||
<ClInclude Include="..\base\CCScriptSupport.h" />
|
||||
<ClInclude Include="..\base\CCStencilStateManager.hpp" />
|
||||
<ClInclude Include="..\base\CCString.h" />
|
||||
<ClInclude Include="..\base\CCTouch.h" />
|
||||
<ClInclude Include="..\base\ccTypes.h" />
|
||||
@@ -540,6 +561,24 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimelineMacro.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmature.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureAnimation.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureDataManager.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureDefine.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCBatchNode.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCBone.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCColliderDetector.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDataReaderHelper.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDatas.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDecorativeDisplay.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDisplayFactory.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDisplayManager.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCProcessBase.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCSkin.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCSpriteFrameCacheHelper.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCTransformHelp.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCTween.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCUtilMath.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\CCActionFrame.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\CCActionFrameEasing.h" />
|
||||
<ClInclude Include="..\editor-support\cocostudio\CCActionManagerEx.h" />
|
||||
@@ -638,6 +677,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32\libs\*.*" "$(OutDir)"
|
||||
<ClInclude Include="..\ui\UIListView.h" />
|
||||
<ClInclude Include="..\ui\UILoadingBar.h" />
|
||||
<ClInclude Include="..\ui\UIPageView.h" />
|
||||
<ClInclude Include="..\ui\UIPageViewIndicator.h" />
|
||||
<ClInclude Include="..\ui\UIRelativeBox.h" />
|
||||
<ClInclude Include="..\ui\UIRichText.h" />
|
||||
<ClInclude Include="..\ui\UIScale9Sprite.h" />
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<Filter Include="cocostudio\TimelineAction\Skeleton">
|
||||
<UniqueIdentifier>{ca5e1475-3bfd-4aae-ad54-2e19d5021b92}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="cocostudio\Armature">
|
||||
<UniqueIdentifier>{0ddcb553-d230-4921-afd4-031a3644a034}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\cocos2d.cpp" />
|
||||
@@ -908,6 +911,66 @@
|
||||
<ClCompile Include="..\..\external\sources\xxhash\xxhash.c">
|
||||
<Filter>external\xxhash</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmature.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureAnimation.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureDataManager.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCArmatureDefine.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCBatchNode.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCBone.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCColliderDetector.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDataReaderHelper.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDatas.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDecorativeDisplay.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDisplayFactory.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCDisplayManager.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCProcessBase.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCSkin.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCSpriteFrameCacheHelper.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCTransformHelp.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCTween.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\editor-support\cocostudio\Armature\CCUtilMath.cpp">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCStencilStateManager.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\ui\UIPageViewIndicator.cpp">
|
||||
<Filter>ui\UIWidgets\ScrollWidget</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\cocos2d.h" />
|
||||
@@ -1806,6 +1869,66 @@
|
||||
<ClInclude Include="..\..\external\sources\xxhash\xxhash.h">
|
||||
<Filter>external\xxhash</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmature.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureAnimation.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureDataManager.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCArmatureDefine.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCBatchNode.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCBone.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCColliderDetector.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDataReaderHelper.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDatas.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDecorativeDisplay.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDisplayFactory.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCDisplayManager.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCProcessBase.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCSkin.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCSpriteFrameCacheHelper.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCTransformHelp.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCTween.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\editor-support\cocostudio\Armature\CCUtilMath.h">
|
||||
<Filter>cocostudio\Armature</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\CCStencilStateManager.hpp">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\ui\UIPageViewIndicator.h">
|
||||
<Filter>ui\UIWidgets\ScrollWidget</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\math\Mat4.inl">
|
||||
|
||||
@@ -28,11 +28,10 @@ THE SOFTWARE.
|
||||
#include "cocostudio/Armature/CCArmatureDefine.h"
|
||||
#include "cocostudio/Armature/CCDatas.h"
|
||||
#include "cocostudio/Armature/CCArmature.h"
|
||||
#include "cocostudio/Armature/DictionaryHelper.h"
|
||||
#include "cocostudio/DictionaryHelper.h"
|
||||
#include "cocostudio/CocosStudioExport.h"
|
||||
|
||||
#include "json/document.h"
|
||||
#include "DictionaryHelper.h"
|
||||
|
||||
#include <string>
|
||||
#include <queue>
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
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/CCPlatformMacros.h"
|
||||
#include "cocostudio/Armature/DictionaryHelper.h"
|
||||
|
||||
namespace cocostudio {
|
||||
|
||||
static DictionaryHelper* sharedHelper = nullptr;
|
||||
|
||||
DictionaryHelper::DictionaryHelper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DictionaryHelper::~DictionaryHelper()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DictionaryHelper* DictionaryHelper::getInstance()
|
||||
{
|
||||
if (!sharedHelper) {
|
||||
sharedHelper = new (std::nothrow) DictionaryHelper();
|
||||
}
|
||||
return sharedHelper;
|
||||
}
|
||||
|
||||
void DictionaryHelper::destroyInstance()
|
||||
{
|
||||
CC_SAFE_DELETE(sharedHelper);
|
||||
}
|
||||
|
||||
const rapidjson::Value& DictionaryHelper::getSubDictionary_json(const rapidjson::Value &root, const char* key)
|
||||
{
|
||||
return root[key];
|
||||
}
|
||||
|
||||
const rapidjson::Value& DictionaryHelper::getSubDictionary_json(const rapidjson::Value &root, const char* key, int idx)
|
||||
{
|
||||
return root[key][idx];
|
||||
}
|
||||
|
||||
const rapidjson::Value& DictionaryHelper::getSubDictionary_json(const rapidjson::Value &root, int idx)
|
||||
{
|
||||
return root[idx];
|
||||
}
|
||||
|
||||
int DictionaryHelper::getIntValue_json(const rapidjson::Value& root, const char* key, int def)
|
||||
{
|
||||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
nRet = root[key].GetInt();
|
||||
} while (0);
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
||||
float DictionaryHelper::getFloatValue_json(const rapidjson::Value& root,const char* key, float def)
|
||||
{
|
||||
float fRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
fRet = (float)root[key].GetDouble();
|
||||
} while (0);
|
||||
|
||||
return fRet;
|
||||
}
|
||||
|
||||
bool DictionaryHelper::getBooleanValue_json(const rapidjson::Value& root,const char* key, bool def)
|
||||
{
|
||||
bool bRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
bRet = root[key].GetBool();
|
||||
} while (0);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
const char* DictionaryHelper::getStringValue_json(const rapidjson::Value& root,const char* key, const char *def)
|
||||
{
|
||||
const char* sRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
sRet = root[key].GetString();
|
||||
} while (0);
|
||||
|
||||
return sRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int DictionaryHelper::getArrayCount_json(const rapidjson::Value& root, const char* key, int def)
|
||||
{
|
||||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(key));
|
||||
CC_BREAK_IF(root[key].IsNull());
|
||||
nRet = (int)(root[key].Size());
|
||||
} while (0);
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
||||
int DictionaryHelper::getIntValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, int def)
|
||||
{
|
||||
int nRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.HasMember(arrayKey));
|
||||
CC_BREAK_IF(root[arrayKey].IsNull());
|
||||
CC_BREAK_IF(root[arrayKey][idx].IsNull());
|
||||
nRet = root[arrayKey][idx].GetInt();
|
||||
} while (0);
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
|
||||
float DictionaryHelper::getFloatValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, float def)
|
||||
{
|
||||
float fRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(root[arrayKey].IsNull());
|
||||
CC_BREAK_IF(root[arrayKey][idx].IsNull());
|
||||
fRet = (float)root[arrayKey][idx].GetDouble();
|
||||
} while (0);
|
||||
|
||||
return fRet;
|
||||
}
|
||||
|
||||
bool DictionaryHelper::getBoolValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, bool def)
|
||||
{
|
||||
bool bRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(root[arrayKey].IsNull());
|
||||
CC_BREAK_IF(root[arrayKey][idx].IsNull());
|
||||
bRet = root[arrayKey][idx].GetBool();
|
||||
} while (0);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
const char* DictionaryHelper::getStringValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, const char *def)
|
||||
{
|
||||
const char *sRet = def;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(root[arrayKey].IsNull());
|
||||
CC_BREAK_IF(root[arrayKey][idx].IsNull());
|
||||
sRet = root[arrayKey][idx].GetString();
|
||||
} while (0);
|
||||
|
||||
return sRet;
|
||||
}
|
||||
|
||||
const rapidjson::Value &DictionaryHelper::getDictionaryFromArray_json(const rapidjson::Value &root, const char* key,int idx)
|
||||
{
|
||||
return root[key][idx];
|
||||
}
|
||||
|
||||
bool DictionaryHelper::checkObjectExist_json(const rapidjson::Value &root)
|
||||
{
|
||||
bool bRet = false;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
bRet = true;
|
||||
} while (0);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool DictionaryHelper::checkObjectExist_json(const rapidjson::Value &root,const char* key)
|
||||
{
|
||||
bool bRet = false;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
bRet = root.HasMember(key);
|
||||
} while (0);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
bool DictionaryHelper::checkObjectExist_json(const rapidjson::Value &root, int index)
|
||||
{
|
||||
bool bRet = false;
|
||||
do {
|
||||
CC_BREAK_IF(root.IsNull());
|
||||
CC_BREAK_IF(!root.IsArray());
|
||||
CC_BREAK_IF(index < 0 || root.Size() <= (unsigned int )index);
|
||||
bRet = true;
|
||||
} while (0);
|
||||
|
||||
return bRet;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
/****************************************************************************
|
||||
Copyright (c) 2013-2016 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __DICTIONARYHELPER_H__
|
||||
#define __DICTIONARYHELPER_H__
|
||||
|
||||
#include "json/document.h"
|
||||
#include "cocostudio/CocosStudioExport.h"
|
||||
|
||||
#define DICTOOL DictionaryHelper::getInstance()
|
||||
|
||||
namespace cocostudio {
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
class CC_STUDIO_DLL DictionaryHelper
|
||||
{
|
||||
public:
|
||||
DictionaryHelper();
|
||||
~DictionaryHelper();
|
||||
static DictionaryHelper* getInstance();
|
||||
static void destroyInstance();
|
||||
|
||||
const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, const char* key);
|
||||
const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, const char* key, int idx);
|
||||
const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, int idx);
|
||||
|
||||
int getIntValue_json(const rapidjson::Value& root, const char* key, int def = 0);
|
||||
float getFloatValue_json(const rapidjson::Value& root,const char* key, float def = 0.0f);
|
||||
bool getBooleanValue_json(const rapidjson::Value& root,const char* key, bool def = false);
|
||||
const char* getStringValue_json(const rapidjson::Value& root,const char* key, const char *def = NULL);
|
||||
int getArrayCount_json(const rapidjson::Value& root,const char* key, int def = 0);
|
||||
|
||||
int getIntValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, int def = 0);
|
||||
float getFloatValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, float def = 0.0f);
|
||||
bool getBoolValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, bool def = false);
|
||||
const char* getStringValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, const char *def = NULL);
|
||||
const rapidjson::Value &getDictionaryFromArray_json(const rapidjson::Value &root, const char* key,int idx);
|
||||
bool checkObjectExist_json(const rapidjson::Value &root);
|
||||
bool checkObjectExist_json(const rapidjson::Value &root, const char* key);
|
||||
bool checkObjectExist_json(const rapidjson::Value &root, int index);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* defined(__CocoGUI__DictionaryHelper__) */
|
||||
|
||||
@@ -431,7 +431,7 @@ static BitmapDC& sharedBitmapDC()
|
||||
return s_BmpDC;
|
||||
}
|
||||
|
||||
Data Device::getTextureDataForText(const char * text, const FontDefinition& textDefinition, TextAlign align, int &width, int &height, bool& hasPremultipliedAlpha)
|
||||
Data Device::getTextureDataForText(const std::string& text, const FontDefinition& textDefinition, TextAlign align, int &width, int &height, bool& hasPremultipliedAlpha)
|
||||
{
|
||||
Data ret;
|
||||
do
|
||||
@@ -446,7 +446,7 @@ Data Device::getTextureDataForText(const char * text, const FontDefinition& text
|
||||
// draw text
|
||||
// does changing to SIZE here affects the font size by rounding from float?
|
||||
SIZE size = {(LONG) textDefinition._dimensions.width,(LONG) textDefinition._dimensions.height};
|
||||
CC_BREAK_IF(! dc.drawText(text, size, align));
|
||||
CC_BREAK_IF(! dc.drawText(text.c_str(), size, align));
|
||||
|
||||
int dataLen = size.cx * size.cy * 4;
|
||||
unsigned char* dataBuf = (unsigned char*)malloc(sizeof(unsigned char) * dataLen);
|
||||
|
||||
Reference in New Issue
Block a user