merge cocos reslove conflict

This commit is contained in:
yangxiao 2014-09-04 17:40:14 +08:00
commit 8da7a4b2de
48 changed files with 1105 additions and 247 deletions

View File

@ -896,6 +896,7 @@ Developers:
kezhuw
AutoReleasePool manager improvement
Fixed a bug that condition variable sleep on unrelated mutex in HttpClient
zhouxiaoxiaoxujian
Added TextField::getStringLength()

View File

@ -1,11 +1,14 @@
cocos2d-x-3.3?? ??
[NEW] ActionManager: added removeAllActionsByTag()
[NEW] Node: added stopAllActionsByTag()
[NEW] Renderer: added TriangleCommand
[NEW] UI: added `WebView` on iOS and Android
[FIX] EditBox: moved to ui:EditBox
[FIX] HttpClient: condition variable sleep on unrelated mutex
[FIX] Node: create unneeded temple `Vec2` object in `setPosition(int, int)`, `setPositionX()` and `setPositionY()`
[FIX] Node: skew effect is wrong
[FIX] Node: setNormalizedPosition can not take effect if parent position is not changed
[FIX] TextureAtlas: may crash if only drawing part of it
cocos2d-x-3.3alpha0 Aug.28 2014

View File

@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
@ -13,40 +15,76 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\l
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libluacocos2d", "..\cocos\scripting\lua-bindings\proj.win32\libluacocos2d.vcxproj", "{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
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
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Debug|Win32 = Debug|Win32
Release|ARM = Release|ARM
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|ARM.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|ARM.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|ARM.ActiveCfg = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|ARM.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|ARM.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|ARM.ActiveCfg = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.Build.0 = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|ARM.ActiveCfg = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.ActiveCfg = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|ARM.ActiveCfg = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|ARM.ActiveCfg = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|ARM.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|ARM.ActiveCfg = Debug|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.ActiveCfg = Debug|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Debug|Win32.Build.0 = Debug|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|ARM.ActiveCfg = Release|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.ActiveCfg = Release|Win32
{9F2D6CE6-C893-4400-B50C-6DB70CC2562F}.Release|Win32.Build.0 = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|ARM.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|ARM.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
{929480E7-23C0-4DF6-8456-096D71547116}.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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{929480E7-23C0-4DF6-8456-096D71547116} = {92D54E36-7916-48EF-A951-224DD3B25442}
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {92D54E36-7916-48EF-A951-224DD3B25442}
EndGlobalSection
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
EndGlobalSection

View File

@ -1827,6 +1827,10 @@
B21770471977ED34009EE11B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770461977ED34009EE11B /* QuartzCore.framework */; };
B21770491977ED4C009EE11B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B21770481977ED4C009EE11B /* libz.dylib */; };
B217704E1977ED9F009EE11B /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = B217704C1977ED8B009EE11B /* libsqlite3.dylib */; };
B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; };
B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */; };
B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */; };
B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */; };
B24AA985195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */; };
B24AA986195A675C007B4522 /* CCFastTMXLayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */; };
B24AA987195A675C007B4522 /* CCFastTMXLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = B24AA982195A675C007B4522 /* CCFastTMXLayer.h */; };
@ -2869,6 +2873,8 @@
B21770481977ED4C009EE11B /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
B217704A1977ED55009EE11B /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; };
B217704C1977ED8B009EE11B /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTrianglesCommand.cpp; sourceTree = "<group>"; };
B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTrianglesCommand.h; sourceTree = "<group>"; };
B24AA981195A675C007B4522 /* CCFastTMXLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFastTMXLayer.cpp; sourceTree = "<group>"; };
B24AA982195A675C007B4522 /* CCFastTMXLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFastTMXLayer.h; sourceTree = "<group>"; };
B24AA983195A675C007B4522 /* CCFastTMXTiledMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCFastTMXTiledMap.cpp; sourceTree = "<group>"; };
@ -4619,6 +4625,8 @@
50ABBD731925AB4100A911A9 /* CCGroupCommand.h */,
B29594B21926D5EC003EEF37 /* CCMeshCommand.cpp */,
B29594B31926D5EC003EEF37 /* CCMeshCommand.h */,
B230ED6F19B417AE00364AA8 /* CCTrianglesCommand.cpp */,
B230ED7019B417AE00364AA8 /* CCTrianglesCommand.h */,
50ABBD741925AB4100A911A9 /* CCQuadCommand.cpp */,
50ABBD751925AB4100A911A9 /* CCQuadCommand.h */,
50ABBD761925AB4100A911A9 /* CCRenderCommand.cpp */,
@ -5017,6 +5025,7 @@
15AE1BE519AAE01E00C27E9E /* CCTableView.h in Headers */,
15AE1BD319AAE01E00C27E9E /* CCControlPotentiometer.h in Headers */,
15AE1B6E19AADA9900C27E9E /* UIHelper.h in Headers */,
B230ED7319B417AE00364AA8 /* CCTrianglesCommand.h in Headers */,
15AE187F19AAD33D00C27E9E /* CCBKeyframe.h in Headers */,
1A570073180BC5A10088DEC7 /* CCActionGrid.h in Headers */,
15AE1BCC19AAE01E00C27E9E /* CCControlButton.h in Headers */,
@ -5599,6 +5608,7 @@
15AE192519AAD35100C27E9E /* CocoLoader.h in Headers */,
15AE1BBB19AADFF000C27E9E /* HttpRequest.h in Headers */,
B60C5BD719AC68B10056FBDE /* CCBillBoard.h in Headers */,
B230ED7419B417AE00364AA8 /* CCTrianglesCommand.h in Headers */,
15AE1A0019AAD3A700C27E9E /* AtlasAttachmentLoader.h in Headers */,
15AE1ACB19AAD40300C27E9E /* b2MouseJoint.h in Headers */,
50ABBD3F1925AB0000A911A9 /* CCGeometry.h in Headers */,
@ -6282,6 +6292,7 @@
15AE1A7819AAD40300C27E9E /* b2PolygonAndCircleContact.cpp in Sources */,
15AE1A3419AAD3D500C27E9E /* b2EdgeShape.cpp in Sources */,
15AE1BA319AADFDF00C27E9E /* UILayoutManager.cpp in Sources */,
B230ED7119B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */,
1A5702F2180BCE750088DEC7 /* CCTMXObjectGroup.cpp in Sources */,
15AE1A5B19AAD40300C27E9E /* b2Timer.cpp in Sources */,
15AE1B1219AAD43700C27E9E /* cpGearJoint.c in Sources */,
@ -6477,6 +6488,7 @@
1A01C6A518F58F7500EFE3A6 /* CCNotificationCenter.cpp in Sources */,
292DB14E19B4574100A80320 /* UIEditBoxImplMac.mm in Sources */,
15AE1BFB19AAE01E00C27E9E /* CCControlUtils.cpp in Sources */,
B230ED7219B417AE00364AA8 /* CCTrianglesCommand.cpp in Sources */,
15AE1B9019AADA9A00C27E9E /* UIWidget.cpp in Sources */,
ED9C6A9518599AD8000A5232 /* CCNodeGrid.cpp in Sources */,
1A01C68F18F57BE800EFE3A6 /* CCDictionary.cpp in Sources */,

View File

@ -126,6 +126,7 @@ Node::Node(void)
, _cascadeColorEnabled(false)
, _cascadeOpacityEnabled(false)
, _usingNormalizedPosition(false)
, _normalizedPositionDirty(false)
, _name("")
, _hashOfName(0)
, _cameraMask(1)
@ -613,6 +614,7 @@ void Node::setNormalizedPosition(const Vec2& position)
_normalizedPosition = position;
_usingNormalizedPosition = true;
_normalizedPositionDirty = true;
_transformUpdated = _transformDirty = _inverseDirty = true;
}
@ -1210,17 +1212,21 @@ void Node::visit()
uint32_t Node::processParentFlags(const Mat4& parentTransform, uint32_t parentFlags)
{
if(_usingNormalizedPosition) {
CCASSERT(_parent, "setNormalizedPosition() doesn't work with orphan nodes");
if ((parentFlags & FLAGS_CONTENT_SIZE_DIRTY) || _normalizedPositionDirty) {
auto s = _parent->getContentSize();
_position.x = _normalizedPosition.x * s.width;
_position.y = _normalizedPosition.y * s.height;
_transformUpdated = _transformDirty = _inverseDirty = true;
_normalizedPositionDirty = false;
}
}
uint32_t flags = parentFlags;
flags |= (_transformUpdated ? FLAGS_TRANSFORM_DIRTY : 0);
flags |= (_contentSizeDirty ? FLAGS_CONTENT_SIZE_DIRTY : 0);
if(_usingNormalizedPosition && (flags & FLAGS_CONTENT_SIZE_DIRTY)) {
CCASSERT(_parent, "setNormalizedPosition() doesn't work with orphan nodes");
auto s = _parent->getContentSize();
_position.x = _normalizedPosition.x * s.width;
_position.y = _normalizedPosition.y * s.height;
_transformUpdated = _transformDirty = _inverseDirty = true;
}
if(flags & FLAGS_DIRTY_MASK)
_modelViewTransform = this->transform(parentTransform);

View File

@ -1555,6 +1555,7 @@ protected:
float _positionZ; ///< OpenGL real Z position
Vec2 _normalizedPosition;
bool _usingNormalizedPosition;
bool _normalizedPositionDirty;
float _skewX; ///< skew angle on x-axis
float _skewY; ///< skew angle on y-axis

View File

@ -10,6 +10,9 @@
<AdditionalIncludeDirectories>$(EngineRoot)cocos;$(EngineRoot)cocos\platform\win32;$(EngineRoot)cocos\platform\desktop;$(EngineRoot)external\glfw3\include\win32;$(EngineRoot)external\win32-specific\gles\include\OGLES</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_VARIADIC_MAX=10;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<BuildMacro Include="EngineRoot">

View File

@ -7,11 +7,14 @@
</PropertyGroup>
<ItemDefinitionGroup>
<Link>
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;glfw3.lib;freetype250.lib;winmm.lib;ws2_32.lib;libchipmunk.lib;libbox2d.lib;libspine.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;glfw3.lib;freetype250.lib;winmm.lib;ws2_32.lib;libchipmunk.lib;libbox2d.lib;libSpine.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link>
<ClCompile />
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -24,7 +24,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
@ -33,7 +33,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@ -77,7 +77,7 @@
</PreBuildEvent>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\Box2d;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(EngineRoot)external\box2d;$(EngineRoot)external\sqlite3\include;$(EngineRoot)external\unzip;$(EngineRoot)external\edtaa3func;$(EngineRoot)external\tinyxml2;$(EngineRoot)external\png\include\win32;$(EngineRoot)external\jpeg\include\win32;$(EngineRoot)external\tiff\include\win32;$(EngineRoot)external\webp\include\win32;$(EngineRoot)external\freetype2\include\win32;$(EngineRoot)external\win32-specific\icon\include;$(EngineRoot)external\win32-specific\zlib\include;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)external\xxhash;$(EngineRoot)external\ConvertUTF;$(EngineRoot)external\curl\include\win32;$(EngineRoot)external\websockets\include\win32;$(EngineRoot)external;$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\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;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -104,9 +104,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(Ou
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\debug-lib\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\box2d\prebuilt\debug-lib\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\debug-lib\*.*" "$(OutDir)"</Command>
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\debug-lib\*.*" "$(OutDir)"</Command>
</PreLinkEvent>
<Link>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
@ -158,8 +156,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(Ou
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\chipmunk\prebuilt\release-lib\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\box2d\prebuilt\release-lib\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-lib\*.*" "$(OutDir)"</Command>
</Command>
</PreLinkEvent>
<Link>
<AdditionalDependencies>sqlite3.lib;libcurl_imp.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
@ -402,6 +399,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l
<ClCompile Include="..\renderer\CCTexture2D.cpp" />
<ClCompile Include="..\renderer\CCTextureAtlas.cpp" />
<ClCompile Include="..\renderer\CCTextureCache.cpp" />
<ClCompile Include="..\renderer\CCTrianglesCommand.cpp" />
<ClCompile Include="..\renderer\CCVertexIndexBuffer.cpp" />
<ClCompile Include="..\renderer\CCVertexIndexData.cpp" />
<ClCompile Include="..\storage\local-storage\LocalStorage.cpp" />
@ -777,6 +775,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l
<ClInclude Include="..\renderer\CCTexture2D.h" />
<ClInclude Include="..\renderer\CCTextureAtlas.h" />
<ClInclude Include="..\renderer\CCTextureCache.h" />
<ClInclude Include="..\renderer\CCTrianglesCommand.h" />
<ClInclude Include="..\renderer\CCVertexIndexBuffer.h" />
<ClInclude Include="..\renderer\CCVertexIndexData.h" />
<ClInclude Include="..\storage\local-storage\LocalStorage.h" />
@ -887,6 +886,14 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\spine\prebuilt\release-l
<None Include="..\math\Vec4.inl" />
<None Include="cocos2d.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\Box2D\proj.win32\libbox2d.vcxproj">
<Project>{929480e7-23c0-4df6-8456-096d71547116}</Project>
</ProjectReference>
<ProjectReference Include="..\editor-support\spine\proj.win32\libSpine.vcxproj">
<Project>{b7c2a162-dec9-4418-972e-240ab3cbfcae}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>

View File

@ -589,6 +589,9 @@
<ClCompile Include="..\renderer\CCCustomCommand.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCTrianglesCommand.cpp">
<Filter>renderer</Filter>
</ClCompile>
<ClCompile Include="..\renderer\CCGLProgram.cpp">
<Filter>renderer</Filter>
</ClCompile>
@ -1588,6 +1591,9 @@
<ClInclude Include="..\renderer\CCBatchCommand.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCTrianglesCommand.h">
<Filter>renderer</Filter>
</ClInclude>
<ClInclude Include="..\renderer\CCCustomCommand.h">
<Filter>renderer</Filter>
</ClInclude>

View File

@ -760,7 +760,17 @@ bool Bundle3D::loadNodes(NodeDatas& nodedatas)
if (_version == "0.1" || _version == "1.2" || _version == "0.2")
{
SkinData skinData;
loadSkinData("", &skinData);
if (!loadSkinData("", &skinData))
{
auto node= new (std::nothrow) NodeData();
auto modelnode = new (std::nothrow) ModelData();
modelnode->matrialId = "";
modelnode->subMeshId = "";
node->modelNodeDatas.push_back(modelnode);
nodedatas.nodes.push_back(node);
return true;
}
auto nodeDatas = new (std::nothrow) NodeData*[skinData.skinBoneNames.size() + skinData.nodeBoneNames.size()];
int index = 0;
size_t i;

View File

@ -231,6 +231,7 @@ Sprite3D* Sprite3D::createSprite3DNode(NodeData* nodedata,ModelData* modeldata,c
auto sprite = new (std::nothrow) Sprite3D();
if (sprite)
{
sprite->setName(nodedata->id);
auto mesh = Mesh::create(nodedata->id, getMeshIndexData(modeldata->subMeshId));
if (modeldata->matrialId == "" && matrialdatas.materials.size())
{
@ -399,6 +400,7 @@ void Sprite3D::createNode(NodeData* nodedata, Node* root, const MaterialDatas& m
node= Node::create();
if(node)
{
node->setName(nodedata->id);
node->setAdditionalTransform(&nodedata->transform);
if(root)
{

View File

@ -159,6 +159,7 @@ renderer/CCVertexIndexBuffer.cpp \
renderer/CCVertexIndexData.cpp \
renderer/CCPrimitive.cpp \
renderer/CCPrimitiveCommand.cpp \
renderer/CCTrianglesCommand.cpp \
deprecated/CCArray.cpp \
deprecated/CCSet.cpp \
deprecated/CCString.cpp \

View File

@ -22,6 +22,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include <functional>
#include "base/ObjectFactory.h"
@ -30,12 +31,22 @@ NS_CC_BEGIN
ObjectFactory::TInfo::TInfo(void)
:_class("")
,_fun(nullptr)
,_func(nullptr)
{
}
ObjectFactory::TInfo::TInfo(const std::string& type, Instance ins)
:_class(type)
,_fun(ins)
,_func(nullptr)
{
ObjectFactory::getInstance()->registerType(*this);
}
ObjectFactory::TInfo::TInfo(const std::string& type, InstanceFunc ins)
:_class(type)
,_fun(nullptr)
,_func(ins)
{
ObjectFactory::getInstance()->registerType(*this);
}
@ -44,18 +55,21 @@ ObjectFactory::TInfo::TInfo(const TInfo &t)
{
_class = t._class;
_fun = t._fun;
_func = t._func;
}
ObjectFactory::TInfo::~TInfo(void)
{
_class = "";
_fun = nullptr;
_func = nullptr;
}
ObjectFactory::TInfo& ObjectFactory::TInfo::operator= (const TInfo &t)
{
_class = t._class;
_fun = t._fun;
_func = t._func;
return *this;
}
@ -88,13 +102,18 @@ void ObjectFactory::destroyInstance()
Ref* ObjectFactory::createObject(const std::string &name)
{
Ref *o = nullptr;
do
{
const TInfo t = _typeMap[name];
CC_BREAK_IF(t._fun == nullptr);
o = t._fun();
} while (0);
Ref *o = nullptr;
do
{
const TInfo t = _typeMap[name];
if (t._fun != nullptr)
{
o = t._fun();
}else if (t._func != nullptr)
{
o = t._func();
}
} while (0);
return o;
}

View File

@ -27,6 +27,7 @@ THE SOFTWARE.
#include <string>
#include <unordered_map>
#include <functional>
#include "base/CCRef.h"
#include "base/CCPlatformMacros.h"
@ -36,15 +37,18 @@ class CC_DLL ObjectFactory
{
public:
typedef cocos2d::Ref* (*Instance)(void);
typedef std::function<cocos2d::Ref* (void)> InstanceFunc;
struct CC_DLL TInfo
{
TInfo(void);
TInfo(const std::string& type, Instance ins = NULL);
TInfo(const std::string& type, Instance ins = nullptr);
TInfo(const std::string& type, InstanceFunc ins = nullptr);
TInfo(const TInfo &t);
~TInfo(void);
TInfo& operator= (const TInfo &t);
std::string _class;
Instance _fun;
InstanceFunc _func;
};
typedef std::unordered_map<std::string, TInfo> FactoryMap;

View File

@ -158,6 +158,7 @@ THE SOFTWARE.
#include "renderer/CCVertexIndexData.h"
#include "renderer/CCPrimitive.h"
#include "renderer/CCPrimitiveCommand.h"
#include "renderer/CCTrianglesCommand.h"
// physics
#include "physics/CCPhysicsBody.h"

View File

@ -313,18 +313,14 @@ void ActionNode::initWithDictionary(const rapidjson::Value& dic, Ref* root)
}
void ActionNode::initActionNodeFromRoot(Ref* root)
{
Node* rootNode = dynamic_cast<Node*>(root);
if (rootNode != nullptr)
{
Widget* rootWidget = dynamic_cast<Widget*>(root);
if (rootWidget != nullptr)
{
Widget* rootWidget = dynamic_cast<Widget*>(root);
if (rootWidget != nullptr)
Widget* widget = Helper::seekActionWidgetByActionTag(rootWidget, getActionTag());
if (widget != nullptr)
{
Widget* widget = Helper::seekActionWidgetByActionTag(rootWidget, getActionTag());
if (widget != nullptr)
{
setObject(widget);
}
setObject(widget);
}
}
}
@ -367,14 +363,6 @@ Node* ActionNode::getActionNode()
{
return cNode;
}
else
{
Widget* rootWidget = dynamic_cast<Widget*>(_object);
if (rootWidget != nullptr)
{
return rootWidget;
}
}
return nullptr;
}

View File

@ -176,6 +176,27 @@ void GUIReader::registerTypeAndCallBack(const std::string& classType,
}
}
void GUIReader::registerTypeAndCallBack(const std::string& classType,
ObjectFactory::InstanceFunc ins,
Ref *object,
SEL_ParseEvent callBack)
{
ObjectFactory* factoryCreate = ObjectFactory::getInstance();
ObjectFactory::TInfo t(classType, ins);
factoryCreate->registerType(t);
if (object)
{
_mapObject.insert(ParseObjectMap::value_type(classType, object));
}
if (callBack)
{
_mapParseSelector.insert(ParseCallBackMap::value_type(classType, callBack));
}
}
Widget* GUIReader::widgetFromJsonFile(const char *fileName)
{
@ -1511,11 +1532,11 @@ void WidgetPropertiesReader0300::setPropsForAllCustomWidgetFromJsonDictionary(co
{
GUIReader* guiReader = GUIReader::getInstance();
std::map<std::string, Ref*> object_map = GUIReader::getInstance()->getParseObjectMap();
Ref* object = object_map[classType];
std::map<std::string, Ref*> *object_map = guiReader->getParseObjectMap();
Ref* object = (*object_map)[classType];
std::map<std::string, SEL_ParseEvent> selector_map = guiReader->getParseCallBackMap();
SEL_ParseEvent selector = selector_map[classType];
std::map<std::string, SEL_ParseEvent> *selector_map = guiReader->getParseCallBackMap();
SEL_ParseEvent selector = (*selector_map)[classType];
if (object && selector)
{

View File

@ -72,6 +72,11 @@ public:
cocos2d::ObjectFactory::Instance ins,
Ref* object,
SEL_ParseEvent callBack);
void registerTypeAndCallBack(const std::string& classType,
cocos2d::ObjectFactory::InstanceFunc ins,
Ref* object,
SEL_ParseEvent callBack);
protected:
GUIReader();
~GUIReader();
@ -85,8 +90,8 @@ protected:
ParseObjectMap _mapObject;
public:
ParseCallBackMap getParseCallBackMap() { return _mapParseSelector; };
ParseObjectMap getParseObjectMap() { return _mapObject; };
ParseCallBackMap* getParseCallBackMap() { return &_mapParseSelector; };
ParseObjectMap* getParseObjectMap() { return &_mapObject; };
};

View File

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\Animation.h" />
<ClInclude Include="..\AnimationState.h" />
<ClInclude Include="..\AnimationStateData.h" />
<ClInclude Include="..\Atlas.h" />
<ClInclude Include="..\AtlasAttachmentLoader.h" />
<ClInclude Include="..\Attachment.h" />
<ClInclude Include="..\AttachmentLoader.h" />
<ClInclude Include="..\Bone.h" />
<ClInclude Include="..\BoneData.h" />
<ClInclude Include="..\BoundingBoxAttachment.h" />
<ClInclude Include="..\CCSkeleton.h" />
<ClInclude Include="..\CCSkeletonAnimation.h" />
<ClInclude Include="..\extension.h" />
<ClInclude Include="..\Event.h" />
<ClInclude Include="..\EventData.h" />
<ClInclude Include="..\Json.h" />
<ClInclude Include="..\RegionAttachment.h" />
<ClInclude Include="..\Skeleton.h" />
<ClInclude Include="..\SkeletonBounds.h" />
<ClInclude Include="..\SkeletonData.h" />
<ClInclude Include="..\SkeletonJson.h" />
<ClInclude Include="..\Skin.h" />
<ClInclude Include="..\Slot.h" />
<ClInclude Include="..\SlotData.h" />
<ClInclude Include="..\spine-cocos2dx.h" />
<ClInclude Include="..\spine.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Animation.cpp" />
<ClCompile Include="..\AnimationState.cpp" />
<ClCompile Include="..\AnimationStateData.cpp" />
<ClCompile Include="..\Atlas.cpp" />
<ClCompile Include="..\AtlasAttachmentLoader.cpp" />
<ClCompile Include="..\Attachment.cpp" />
<ClCompile Include="..\AttachmentLoader.cpp" />
<ClCompile Include="..\Bone.cpp" />
<ClCompile Include="..\BoneData.cpp" />
<ClCompile Include="..\BoundingBoxAttachment.cpp" />
<ClCompile Include="..\CCSkeleton.cpp" />
<ClCompile Include="..\CCSkeletonAnimation.cpp" />
<ClCompile Include="..\extension.cpp" />
<ClCompile Include="..\Event.cpp" />
<ClCompile Include="..\EventData.cpp" />
<ClCompile Include="..\Json.cpp" />
<ClCompile Include="..\RegionAttachment.cpp" />
<ClCompile Include="..\Skeleton.cpp" />
<ClCompile Include="..\SkeletonBounds.cpp" />
<ClCompile Include="..\SkeletonData.cpp" />
<ClCompile Include="..\SkeletonJson.cpp" />
<ClCompile Include="..\Skin.cpp" />
<ClCompile Include="..\Slot.cpp" />
<ClCompile Include="..\SlotData.cpp" />
<ClCompile Include="..\spine-cocos2dx.cpp" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}</ProjectGuid>
<RootNamespace>libSpine</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\2d\cocos2d_headers.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration).win32\</OutDir>
<IntDir>$(Configuration).win32\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>
</SDLCheck>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(EngineRoot);$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\editor-support;$(EngineRoot)extensions;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>None</DebugInformationFormat>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\SlotData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\spine.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\spine-cocos2dx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Animation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AnimationState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AnimationStateData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Atlas.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AtlasAttachmentLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Attachment.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\AttachmentLoader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Bone.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\BoneData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\BoundingBoxAttachment.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Event.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\EventData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCSkeleton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\CCSkeletonAnimation.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\extension.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Json.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\RegionAttachment.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Skeleton.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SkeletonData.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SkeletonBounds.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\SkeletonJson.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Skin.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Slot.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\Skeleton.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SkeletonBounds.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SkeletonData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SkeletonJson.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Skin.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Slot.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\SlotData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\spine-cocos2dx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Animation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AnimationState.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AnimationStateData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Atlas.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AtlasAttachmentLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Attachment.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\AttachmentLoader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Bone.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\BoundingBoxAttachment.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Event.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\EventData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCSkeleton.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\CCSkeletonAnimation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\extension.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\Json.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\RegionAttachment.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\BoneData.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -47,16 +47,13 @@ namespace network {
static std::mutex s_requestQueueMutex;
static std::mutex s_responseQueueMutex;
static std::mutex s_SleepMutex;
static std::condition_variable s_SleepCondition;
static std::condition_variable_any s_SleepCondition;
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
typedef int int32_t;
#endif
static bool s_need_quit = false;
static Vector<HttpRequest*>* s_requestQueue = nullptr;
static Vector<HttpResponse*>* s_responseQueue = nullptr;
@ -102,43 +99,31 @@ static int processDeleteTask(HttpRequest *request, write_callback callback, void
// int processDownloadTask(HttpRequest *task, write_callback callback, void *stream, int32_t *errorCode);
static void processResponse(HttpResponse* response, char* errorBuffer);
static HttpRequest *s_requestSentinel = new HttpRequest;
// Worker thread
void HttpClient::networkThread()
{
HttpRequest *request = nullptr;
auto scheduler = Director::getInstance()->getScheduler();
while (true)
{
if (s_need_quit)
{
break;
}
HttpRequest *request;
// step 1: send http request if the requestQueue isn't empty
request = nullptr;
s_requestQueueMutex.lock();
//Get request task from queue
if (!s_requestQueue->empty())
{
std::lock_guard<std::mutex> lock(s_requestQueueMutex);
while (s_requestQueue->empty()) {
s_SleepCondition.wait(s_requestQueueMutex);
}
request = s_requestQueue->at(0);
s_requestQueue->erase(0);
}
s_requestQueueMutex.unlock();
if (nullptr == request)
{
// Wait for http request tasks from main thread
std::unique_lock<std::mutex> lk(s_SleepMutex);
s_SleepCondition.wait(lk);
continue;
if (request == s_requestSentinel) {
break;
}
// step 2: libcurl sync access
// Create a HttpResponse object, the default setting is http access failed
@ -462,12 +447,14 @@ HttpClient::HttpClient()
HttpClient::~HttpClient()
{
s_need_quit = true;
if (s_requestQueue != nullptr) {
{
std::lock_guard<std::mutex> lock(s_requestQueueMutex);
s_requestQueue->pushBack(s_requestSentinel);
}
s_SleepCondition.notify_one();
}
s_pHttpClient = nullptr;
}
@ -480,9 +467,7 @@ bool HttpClient::lazyInitThreadSemphore()
s_requestQueue = new (std::nothrow) Vector<HttpRequest*>();
s_responseQueue = new (std::nothrow) Vector<HttpResponse*>();
s_need_quit = false;
auto t = std::thread(CC_CALLBACK_0(HttpClient::networkThread, this));
t.detach();
}

View File

@ -91,7 +91,6 @@ public class Cocos2dxHelper {
Cocos2dxHelper.nativeSetContext((Context)activity, Cocos2dxHelper.sAssetManager);
Cocos2dxBitmap.setContext(activity);
Cocos2dxETCLoader.setContext(activity);
sActivity = activity;
sInited = true;

View File

@ -147,7 +147,7 @@ static Data getData(const std::string& filename, bool forString)
WCHAR wszBuf[CC_MAX_PATH] = {0};
MultiByteToWideChar(CP_UTF8, 0, fullPath.c_str(), -1, wszBuf, sizeof(wszBuf)/sizeof(wszBuf[0]));
HANDLE fileHandle = ::CreateFileW(wszBuf, GENERIC_READ, 0, NULL, OPEN_EXISTING, NULL, nullptr);
HANDLE fileHandle = ::CreateFileW(wszBuf, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, nullptr);
CC_BREAK_IF(fileHandle == INVALID_HANDLE_VALUE);
size = ::GetFileSize(fileHandle, nullptr);
@ -222,7 +222,7 @@ unsigned char* FileUtilsWin32::getFileData(const std::string& filename, const ch
WCHAR wszBuf[CC_MAX_PATH] = {0};
MultiByteToWideChar(CP_UTF8, 0, fullPath.c_str(), -1, wszBuf, sizeof(wszBuf)/sizeof(wszBuf[0]));
HANDLE fileHandle = ::CreateFileW(wszBuf, GENERIC_READ, 0, NULL, OPEN_EXISTING, NULL, nullptr);
HANDLE fileHandle = ::CreateFileW(wszBuf, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, nullptr);
CC_BREAK_IF(fileHandle == INVALID_HANDLE_VALUE);
*size = ::GetFileSize(fileHandle, nullptr);

View File

@ -28,16 +28,12 @@
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "xxhash.h"
#include "renderer/CCRenderer.h"
NS_CC_BEGIN
QuadCommand::QuadCommand()
:_materialID(0)
,_textureID(0)
,_glProgramState(nullptr)
,_blendType(BlendFunc::DISABLE)
,_quads(nullptr)
:_quads(nullptr)
,_quadsCount(0)
{
_type = RenderCommand::Type::QUAD_COMMAND;
@ -52,6 +48,29 @@ void QuadCommand::init(float globalOrder, GLuint textureID, GLProgramState* glPr
_quadsCount = quadCount;
_quads = quad;
//generate triangles
{
static std::vector<GLushort> QUADINDICESMAX;
if(QUADINDICESMAX.size() == 0)
{
QUADINDICESMAX.resize(Renderer::INDEX_VBO_SIZE);
for(ssize_t i = 0; i < Renderer::INDEX_VBO_SIZE / 6; ++i)
{
QUADINDICESMAX[ 6 * i + 0] = 4 * i + 0;
QUADINDICESMAX[ 6 * i + 1] = 4 * i + 1;
QUADINDICESMAX[ 6 * i + 2] = 4 * i + 2;
QUADINDICESMAX[ 6 * i + 3] = 4 * i + 3;
QUADINDICESMAX[ 6 * i + 4] = 4 * i + 2;
QUADINDICESMAX[ 6 * i + 5] = 4 * i + 1;
}
}
_triangles.vertCount = quadCount * 4;
_triangles.indexCount = quadCount * 6;
_triangles.indices = &QUADINDICESMAX[0];
_triangles.verts = &quad->tl;
}
_mv = mv;
@ -69,31 +88,4 @@ QuadCommand::~QuadCommand()
{
}
void QuadCommand::generateMaterialID()
{
if(_glProgramState->getUniformCount() > 0)
{
_materialID = QuadCommand::MATERIAL_ID_DO_NOT_BATCH;
}
else
{
int glProgram = (int)_glProgramState->getGLProgram()->getProgram();
int intArray[4] = { glProgram, (int)_textureID, (int)_blendType.src, (int)_blendType.dst};
_materialID = XXH32((const void*)intArray, sizeof(intArray), 0);
}
}
void QuadCommand::useMaterial() const
{
//Set texture
GL::bindTexture2D(_textureID);
//set blend mode
GL::blendFunc(_blendType.src, _blendType.dst);
_glProgramState->apply(_mv);
}
NS_CC_END

View File

@ -27,14 +27,14 @@
#include "renderer/CCRenderCommand.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCTrianglesCommand.h"
NS_CC_BEGIN
/** Command used to render one or more Quads */
class CC_DLL QuadCommand : public RenderCommand
class CC_DLL QuadCommand : public TrianglesCommand
{
public:
static const int MATERIAL_ID_DO_NOT_BATCH = 0;
QuadCommand();
~QuadCommand();
@ -44,26 +44,12 @@ public:
void init(float globalOrder, GLuint texutreID, GLProgramState* shader, BlendFunc blendType, V3F_C4B_T2F_Quad* quads, ssize_t quadCount,
const Mat4& mv);
void useMaterial() const;
inline uint32_t getMaterialID() const { return _materialID; }
inline GLuint getTextureID() const { return _textureID; }
inline V3F_C4B_T2F_Quad* getQuads() const { return _quads; }
inline const V3F_C4B_T2F_Quad* getQuads() const { return _quads; }
inline ssize_t getQuadCount() const { return _quadsCount; }
inline GLProgramState* getGLProgramState() const { return _glProgramState; }
inline BlendFunc getBlendType() const { return _blendType; }
inline const Mat4& getModelView() const { return _mv; }
protected:
void generateMaterialID();
uint32_t _materialID;
GLuint _textureID;
GLProgramState* _glProgramState;
BlendFunc _blendType;
V3F_C4B_T2F_Quad* _quads;
ssize_t _quadsCount;
Mat4 _mv;
};
NS_CC_END

View File

@ -50,6 +50,7 @@ public:
GROUP_COMMAND,
MESH_COMMAND,
PRIMITIVE_COMMAND,
TRIANGLES_COMMAND
};
/** Get Render Command Id */

View File

@ -26,6 +26,7 @@
#include <algorithm>
#include "renderer/CCTrianglesCommand.h"
#include "renderer/CCQuadCommand.h"
#include "renderer/CCBatchCommand.h"
#include "renderer/CCCustomCommand.h"
@ -138,7 +139,8 @@ static const int DEFAULT_RENDER_QUEUE = 0;
Renderer::Renderer()
:_lastMaterialID(0)
,_lastBatchedMeshCommand(nullptr)
,_numQuads(0)
,_filledVertex(0)
,_filledIndex(0)
,_glViewAssigned(false)
,_isRendering(false)
#if CC_ENABLE_CACHE_TEXTURE_DATA
@ -151,7 +153,7 @@ Renderer::Renderer()
RenderQueue defaultRenderQueue;
_renderGroups.push_back(defaultRenderQueue);
_batchedQuadCommands.reserve(BATCH_QUADCOMMAND_RESEVER_SIZE);
_batchedCommands.reserve(BATCH_QUADCOMMAND_RESEVER_SIZE);
}
Renderer::~Renderer()
@ -181,27 +183,12 @@ void Renderer::initGLView()
Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_cacheTextureListener, -1);
#endif
setupIndices();
setupBuffer();
_glViewAssigned = true;
}
void Renderer::setupIndices()
{
for( int i=0; i < VBO_SIZE; i++)
{
_indices[i*6+0] = (GLushort) (i*4+0);
_indices[i*6+1] = (GLushort) (i*4+1);
_indices[i*6+2] = (GLushort) (i*4+2);
_indices[i*6+3] = (GLushort) (i*4+3);
_indices[i*6+4] = (GLushort) (i*4+2);
_indices[i*6+5] = (GLushort) (i*4+1);
}
}
void Renderer::setupBuffer()
{
if(Configuration::getInstance()->supportsShareableVAO())
@ -222,7 +209,7 @@ void Renderer::setupVBOAndVAO()
glGenBuffers(2, &_buffersVBO[0]);
glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * VBO_SIZE, _quads, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * VBO_SIZE, _verts, GL_DYNAMIC_DRAW);
// vertices
glEnableVertexAttribArray(GLProgram::VERTEX_ATTRIB_POSITION);
@ -237,7 +224,7 @@ void Renderer::setupVBOAndVAO()
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(V3F_C4B_T2F), (GLvoid*) offsetof( V3F_C4B_T2F, texCoords));
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * VBO_SIZE * 6, _indices, GL_STATIC_DRAW);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * INDEX_VBO_SIZE, _indices, GL_STATIC_DRAW);
// Must unbind the VAO before changing the element buffer.
GL::bindVAO(0);
@ -260,11 +247,11 @@ void Renderer::mapBuffers()
GL::bindVAO(0);
glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * VBO_SIZE, _quads, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * VBO_SIZE, _verts, GL_DYNAMIC_DRAW);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * VBO_SIZE * 6, _indices, GL_STATIC_DRAW);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * INDEX_VBO_SIZE, _indices, GL_STATIC_DRAW);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
CHECK_GL_ERROR_DEBUG();
@ -316,25 +303,22 @@ void Renderer::visitRenderQueue(const RenderQueue& queue)
{
auto command = queue[index];
auto commandType = command->getType();
if(RenderCommand::Type::QUAD_COMMAND == commandType)
if(RenderCommand::Type::QUAD_COMMAND == commandType || RenderCommand::Type::TRIANGLES_COMMAND == commandType)
{
flush3D();
auto cmd = static_cast<QuadCommand*>(command);
auto cmd = static_cast<TrianglesCommand*>(command);
//Batch quads
if(_numQuads + cmd->getQuadCount() > VBO_SIZE)
if( _filledVertex + cmd->getVertexCount() > VBO_SIZE || _filledIndex + cmd->getIndexCount() > INDEX_VBO_SIZE)
{
CCASSERT(cmd->getQuadCount()>= 0 && cmd->getQuadCount() < VBO_SIZE, "VBO is not big enough for quad data, please break the quad data down or use customized render command");
CCASSERT(cmd->getVertexCount()>= 0 && cmd->getVertexCount() < VBO_SIZE, "VBO for vertex is not big enough, please break the data down or use customized render command");
CCASSERT(cmd->getIndexCount()>= 0 && cmd->getIndexCount() < INDEX_VBO_SIZE, "VBO for index is not big enough, please break the data down or use customized render command");
//Draw batched quads if VBO is full
drawBatchedQuads();
}
_batchedQuadCommands.push_back(cmd);
_batchedCommands.push_back(cmd);
memcpy(_quads + _numQuads, cmd->getQuads(), sizeof(V3F_C4B_T2F_Quad) * cmd->getQuadCount());
convertToWorldCoordinates(_quads + _numQuads, cmd->getQuadCount(), cmd->getModelView());
_numQuads += cmd->getQuadCount();
fillVerticesAndIndices(cmd);
}
else if(RenderCommand::Type::GROUP_COMMAND == commandType)
@ -389,18 +373,19 @@ void Renderer::visitTransparentRenderQueue(const TransparentRenderQueue& queue)
// do not batch for transparent objects
ssize_t size = queue.size();
_batchedCommands.clear();
_filledVertex = 0;
_filledIndex = 0;
for (ssize_t index = 0; index < size; ++index)
{
auto command = queue[index];
auto commandType = command->getType();
if(RenderCommand::Type::QUAD_COMMAND == commandType)
if(RenderCommand::Type::QUAD_COMMAND == commandType || RenderCommand::Type::TRIANGLES_COMMAND == commandType)
{
auto cmd = static_cast<QuadCommand*>(command);
_batchedQuadCommands.push_back(cmd);
_numQuads = (int)cmd->getQuadCount();
memcpy(_quads, cmd->getQuads(), sizeof(V3F_C4B_T2F_Quad) * cmd->getQuadCount());
convertToWorldCoordinates(_quads, cmd->getQuadCount(), cmd->getModelView());
auto cmd = static_cast<TrianglesCommand*>(command);
_batchedCommands.push_back(cmd);
fillVerticesAndIndices(cmd);
drawBatchedQuads();
}
else if(RenderCommand::Type::GROUP_COMMAND == commandType)
@ -482,52 +467,55 @@ void Renderer::clean()
}
// Clear batch quad commands
_batchedQuadCommands.clear();
_numQuads = 0;
_batchedCommands.clear();
_filledVertex = 0;
_filledIndex = 0;
_lastMaterialID = 0;
_lastBatchedMeshCommand = nullptr;
_transparentRenderGroups.clear();
}
void Renderer::convertToWorldCoordinates(V3F_C4B_T2F_Quad* quads, ssize_t quantity, const Mat4& modelView)
void Renderer::fillVerticesAndIndices(const TrianglesCommand* cmd)
{
// kmMat4 matrixP, mvp;
// kmGLGetMatrix(KM_GL_PROJECTION, &matrixP);
// kmMat4Multiply(&mvp, &matrixP, &modelView);
for(ssize_t i=0; i<quantity; ++i)
memcpy(_verts + _filledVertex, cmd->getVertices(), sizeof(V3F_C4B_T2F) * cmd->getVertexCount());
const Mat4& modelView = cmd->getModelView();
for(ssize_t i=0; i< cmd->getVertexCount(); ++i)
{
V3F_C4B_T2F_Quad *q = &quads[i];
Vec3 *vec1 = (Vec3*)&q->bl.vertices;
V3F_C4B_T2F *q = &_verts[i + _filledVertex];
Vec3 *vec1 = (Vec3*)&q->vertices;
modelView.transformPoint(vec1);
Vec3 *vec2 = (Vec3*)&q->br.vertices;
modelView.transformPoint(vec2);
Vec3 *vec3 = (Vec3*)&q->tr.vertices;
modelView.transformPoint(vec3);
Vec3 *vec4 = (Vec3*)&q->tl.vertices;
modelView.transformPoint(vec4);
}
const unsigned short* indices = cmd->getIndices();
//fill index
for(ssize_t i=0; i< cmd->getIndexCount(); ++i)
{
_indices[_filledIndex + i] = _filledVertex + indices[i];
}
_filledVertex += cmd->getVertexCount();
_filledIndex += cmd->getIndexCount();
}
void Renderer::drawBatchedQuads()
{
//TODO: we can improve the draw performance by insert material switching command before hand.
int quadsToDraw = 0;
int startQuad = 0;
int indexToDraw = 0;
int startIndex = 0;
//Upload buffer to VBO
if(_numQuads <= 0 || _batchedQuadCommands.empty())
if(_filledVertex <= 0 || _filledIndex <= 0 || _batchedCommands.empty())
{
return;
}
if (Configuration::getInstance()->supportsShareableVAO())
{
//Bind VAO
GL::bindVAO(_quadVAO);
//Set VBO data
glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]);
@ -538,22 +526,22 @@ void Renderer::drawBatchedQuads()
// glBufferData(GL_ARRAY_BUFFER, sizeof(quads_[0]) * (n-start), &quads_[start], GL_DYNAMIC_DRAW);
// option 3: orphaning + glMapBuffer
glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * (_numQuads), nullptr, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * _filledVertex, nullptr, GL_DYNAMIC_DRAW);
void *buf = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY);
memcpy(buf, _quads, sizeof(_quads[0])* (_numQuads));
memcpy(buf, _verts, sizeof(_verts[0])* _filledVertex);
glUnmapBuffer(GL_ARRAY_BUFFER);
glBindBuffer(GL_ARRAY_BUFFER, 0);
//Bind VAO
GL::bindVAO(_quadVAO);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _filledIndex, _indices, GL_STATIC_DRAW);
}
else
{
#define kQuadSize sizeof(_quads[0].bl)
#define kQuadSize sizeof(_verts[0])
glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]);
glBufferData(GL_ARRAY_BUFFER, sizeof(_quads[0]) * _numQuads , _quads, GL_DYNAMIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(_verts[0]) * _filledVertex , _verts, GL_DYNAMIC_DRAW);
GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX);
@ -567,23 +555,24 @@ void Renderer::drawBatchedQuads()
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof(V3F_C4B_T2F, texCoords));
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(_indices[0]) * _filledIndex, _indices, GL_STATIC_DRAW);
}
//Start drawing verties in batch
for(const auto& cmd : _batchedQuadCommands)
for(const auto& cmd : _batchedCommands)
{
auto newMaterialID = cmd->getMaterialID();
if(_lastMaterialID != newMaterialID || newMaterialID == QuadCommand::MATERIAL_ID_DO_NOT_BATCH)
if(_lastMaterialID != newMaterialID || newMaterialID == TrianglesCommand::MATERIAL_ID_DO_NOT_BATCH)
{
//Draw quads
if(quadsToDraw > 0)
if(indexToDraw > 0)
{
glDrawElements(GL_TRIANGLES, (GLsizei) quadsToDraw*6, GL_UNSIGNED_SHORT, (GLvoid*) (startQuad*6*sizeof(_indices[0])) );
glDrawElements(GL_TRIANGLES, (GLsizei) indexToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (startIndex*sizeof(_indices[0])) );
_drawnBatches++;
_drawnVertices += quadsToDraw*6;
_drawnVertices += indexToDraw;
startQuad += quadsToDraw;
quadsToDraw = 0;
startIndex += indexToDraw;
indexToDraw = 0;
}
//Use new material
@ -591,15 +580,15 @@ void Renderer::drawBatchedQuads()
_lastMaterialID = newMaterialID;
}
quadsToDraw += cmd->getQuadCount();
indexToDraw += cmd->getIndexCount();
}
//Draw any remaining quad
if(quadsToDraw > 0)
if(indexToDraw > 0)
{
glDrawElements(GL_TRIANGLES, (GLsizei) quadsToDraw*6, GL_UNSIGNED_SHORT, (GLvoid*) (startQuad*6*sizeof(_indices[0])) );
glDrawElements(GL_TRIANGLES, (GLsizei) indexToDraw, GL_UNSIGNED_SHORT, (GLvoid*) (startIndex*sizeof(_indices[0])) );
_drawnBatches++;
_drawnVertices += quadsToDraw*6;
_drawnVertices += indexToDraw;
}
if (Configuration::getInstance()->supportsShareableVAO())
@ -613,8 +602,9 @@ void Renderer::drawBatchedQuads()
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
}
_batchedQuadCommands.clear();
_numQuads = 0;
_batchedCommands.clear();
_filledVertex = 0;
_filledIndex = 0;
}
void Renderer::flush()

View File

@ -38,6 +38,7 @@ NS_CC_BEGIN
class EventListenerCustom;
class QuadCommand;
class TrianglesCommand;
class MeshCommand;
/** Class that knows how to sort `RenderCommand` objects.
@ -91,7 +92,9 @@ Whenever possible prefer to use `QuadCommand` objects since the renderer will au
class CC_DLL Renderer
{
public:
static const int VBO_SIZE = 65536 / 6;
static const int VBO_SIZE = 8192;
static const int INDEX_VBO_SIZE = 8192 * 6 / 4;
static const int BATCH_QUADCOMMAND_RESEVER_SIZE = 64;
Renderer();
@ -142,7 +145,6 @@ public:
protected:
void setupIndices();
//Setup VBO or VAO based on OpenGL extensions
void setupBuffer();
void setupVBOAndVAO();
@ -162,7 +164,7 @@ protected:
void visitTransparentRenderQueue(const TransparentRenderQueue& queue);
void convertToWorldCoordinates(V3F_C4B_T2F_Quad* quads, ssize_t quantity, const Mat4& modelView);
void fillVerticesAndIndices(const TrianglesCommand* cmd);
std::stack<int> _commandGroupStack;
@ -172,14 +174,15 @@ protected:
uint32_t _lastMaterialID;
MeshCommand* _lastBatchedMeshCommand;
std::vector<QuadCommand*> _batchedQuadCommands;
std::vector<TrianglesCommand*> _batchedCommands;
V3F_C4B_T2F_Quad _quads[VBO_SIZE];
GLushort _indices[6 * VBO_SIZE];
V3F_C4B_T2F _verts[VBO_SIZE];
GLushort _indices[INDEX_VBO_SIZE];
GLuint _quadVAO;
GLuint _buffersVBO[2]; //0: vertex 1: indices
int _numQuads;
int _filledVertex;
int _filledIndex;
bool _glViewAssigned;

View File

@ -0,0 +1,100 @@
/****************************************************************************
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 "renderer/CCTrianglesCommand.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "xxhash.h"
#include "renderer/CCRenderer.h"
NS_CC_BEGIN
TrianglesCommand::TrianglesCommand()
:_materialID(0)
,_textureID(0)
,_glProgramState(nullptr)
,_blendType(BlendFunc::DISABLE)
{
_type = RenderCommand::Type::TRIANGLES_COMMAND;
}
void TrianglesCommand::init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv)
{
CCASSERT(glProgramState, "Invalid GLProgramState");
CCASSERT(glProgramState->getVertexAttribsFlags() == 0, "No custom attributes are supported in QuadCommand");
_globalOrder = globalOrder;
_triangles = triangles;
if(_triangles.indexCount % 3 != 0)
{
ssize_t count = _triangles.indexCount;
_triangles.indexCount = count / 3 * 3;
CCLOGERROR("Resize indexCount from %zd to %zd, size must be multiple times of 3", count, _triangles.indexCount);
}
_mv = mv;
if( _textureID != textureID || _blendType.src != blendType.src || _blendType.dst != blendType.dst || _glProgramState != glProgramState) {
_textureID = textureID;
_blendType = blendType;
_glProgramState = glProgramState;
generateMaterialID();
}
}
TrianglesCommand::~TrianglesCommand()
{
}
void TrianglesCommand::generateMaterialID()
{
if(_glProgramState->getUniformCount() > 0)
{
_materialID = TrianglesCommand::MATERIAL_ID_DO_NOT_BATCH;
}
else
{
int glProgram = (int)_glProgramState->getGLProgram()->getProgram();
int intArray[4] = { glProgram, (int)_textureID, (int)_blendType.src, (int)_blendType.dst};
_materialID = XXH32((const void*)intArray, sizeof(intArray), 0);
}
}
void TrianglesCommand::useMaterial() const
{
//Set texture
GL::bindTexture2D(_textureID);
//set blend mode
GL::blendFunc(_blendType.src, _blendType.dst);
_glProgramState->apply(_mv);
}
NS_CC_END

View File

@ -0,0 +1,79 @@
/****************************************************************************
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.
****************************************************************************/
#ifndef __CC_TRIANGLES_COMMAND__
#define __CC_TRIANGLES_COMMAND__
#include "renderer/CCRenderCommand.h"
#include "renderer/CCGLProgramState.h"
NS_CC_BEGIN
class CC_DLL TrianglesCommand : public RenderCommand
{
public:
static const int MATERIAL_ID_DO_NOT_BATCH = 0;
public:
struct Triangles
{
V3F_C4B_T2F* verts;
unsigned short* indices;
ssize_t vertCount;
ssize_t indexCount;
};
TrianglesCommand();
~TrianglesCommand();
/** Initializes the command with a globalZOrder, a texture ID, a `GLProgram`, a blending function, a pointer to triangles,
* quantity of quads, and the Model View transform to be used for the quads */
void init(float globalOrder, GLuint textureID, GLProgramState* glProgramState, BlendFunc blendType, const Triangles& triangles,const Mat4& mv);
void useMaterial() const;
inline uint32_t getMaterialID() const { return _materialID; }
inline GLuint getTextureID() const { return _textureID; }
inline const Triangles& getTriangles() const { return _triangles; }
inline ssize_t getVertexCount() const { return _triangles.vertCount; }
inline ssize_t getIndexCount() const { return _triangles.indexCount; }
inline const V3F_C4B_T2F* getVertices() const { return _triangles.verts; }
inline const unsigned short* getIndices() const { return _triangles.indices; }
inline GLProgramState* getGLProgramState() const { return _glProgramState; }
inline BlendFunc getBlendType() const { return _blendType; }
inline const Mat4& getModelView() const { return _mv; }
protected:
void generateMaterialID();
uint32_t _materialID;
GLuint _textureID;
GLProgramState* _glProgramState;
BlendFunc _blendType;
Triangles _triangles;
Mat4 _mv;
};
NS_CC_END
#endif // defined(__CC_TRIANGLES_COMMAND__)

View File

@ -0,0 +1,87 @@
#include "CustomGUIReader.h"
#include "CCLuaEngine.h"
#include "base/ObjectFactory.h"
#include "json/document.h"
#include "json/writer.h"
#include "json/stringbuffer.h"
USING_NS_CC;
namespace cocostudio
{
CustomGUIReader* CustomGUIReader::create(std::string &className, int createFunc, int setPropsFunc)
{
auto reader = new CustomGUIReader();
reader->init(className, createFunc, setPropsFunc);
return reader;
}
Ref* CustomGUIReader::createInstance()
{
Ref* result = nullptr;
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
stack->executeFunction(_createFunc, 0, 1, [&result](lua_State* L,int numReturn){
result = static_cast<Ref*>(tolua_tousertype(L, -1, nullptr));
lua_pop(L, 1);
});
return result;
}
CustomGUIReader::CustomGUIReader()
:_className()
,_createFunc(0)
,_setPropsFunc(0)
{
}
CustomGUIReader::~CustomGUIReader()
{
if (_createFunc)
{
LuaEngine::getInstance()->removeScriptHandler(_createFunc);
_createFunc = 0;
}
if (_setPropsFunc)
{
LuaEngine::getInstance()->removeScriptHandler(_setPropsFunc);
_setPropsFunc = 0;
}
}
void CustomGUIReader::init(std::string &className, int createFunc, int setPropsFunc)
{
_className = className;
_createFunc = createFunc;
_setPropsFunc = setPropsFunc;
ObjectFactory* factoryCreate = ObjectFactory::getInstance();
ObjectFactory::TInfo t;
t._class = className;
t._func = CC_CALLBACK_0(CustomGUIReader::createInstance, this);
factoryCreate->registerType(t);
auto guiReader = GUIReader::getInstance();
auto objMap = guiReader->getParseObjectMap();
(*objMap)[className] = this;
auto callbackMap = guiReader->getParseCallBackMap();
(*callbackMap)[className] = parseselector(CustomGUIReader::setCustomProps);
}
void CustomGUIReader::setCustomProps(const std::string &classType, cocos2d::Ref *widget, const rapidjson::Value &customOptions)
{
if (_setPropsFunc != 0)
{
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
customOptions.Accept(writer);
auto stack = LuaEngine::getInstance()->getLuaStack();
stack->pushString(classType.c_str(), classType.size());
stack->pushObject(widget, "cc.Ref");
stack->pushString(buffer.GetString(), buffer.Size());
stack->executeFunctionByHandler(_setPropsFunc, 3);
}
}
}

View File

@ -0,0 +1,34 @@
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_CUSTOM_GUI_READER_H
#define COCOS_SCRIPTING_LUA_BINDINGS_LUA_COCOS2DX_CUSTOM_GUI_READER_H
#include "cocostudio/WidgetReader/WidgetReader.h"
USING_NS_CC;
namespace cocostudio
{
class CustomGUIReader : public Ref
{
public:
CustomGUIReader();
virtual ~CustomGUIReader();
static CustomGUIReader* create(std::string &className, int createFunc, int setPropsFunc);
void init(std::string &className, int createFunc, int setPropsFunc);
Ref* createInstance();
void setCustomProps(const std::string &classType, cocos2d::Ref *widget, const rapidjson::Value &customOptions);
private:
std::string _className;
int _createFunc;
int _setPropsFunc;
};
}
#endif

View File

@ -30,6 +30,7 @@
#include "CCLuaValue.h"
#include "CocoStudio.h"
#include "CCLuaEngine.h"
#include "CustomGUIReader.h"
using namespace cocostudio;
@ -554,6 +555,53 @@ static void extendActionTimeline(lua_State* L)
lua_pop(L, 1);
}
int lua_cocos2dx_CustomGUIReader_create(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
#if COCOS2D_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ccs.CustomGUIReader",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S)-1;
do
{
if (argc == 3)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccs.CustomGUIReader:create");
if (!ok) { break; }
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,3,"LUA_FUNCTION",0,&tolua_err)) {
goto tolua_lerror;
}
#endif
LUA_FUNCTION arg1 = toluafix_ref_function(tolua_S,3,0);
#if COCOS2D_DEBUG >= 1
if (!toluafix_isfunction(tolua_S,4,"LUA_FUNCTION",0,&tolua_err)) {
goto tolua_lerror;
}
#endif
LUA_FUNCTION arg2 = toluafix_ref_function(tolua_S,4,0);
cocostudio::CustomGUIReader* ret = cocostudio::CustomGUIReader::create(arg0, arg1, arg2);
object_to_luaval<cocostudio::CustomGUIReader>(tolua_S, "ccs.CustomGUIReader",(cocostudio::CustomGUIReader*)ret);
return 1;
}
} while (0);
CCLOG("%s has wrong number of arguments: %d, was expecting %d", "ccs.CustomGUIReader:create",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_CustomGUIReader_create'.",&tolua_err);
#endif
return 0;
}
int register_all_cocos2dx_coco_studio_manual(lua_State* L)
{
@ -569,6 +617,26 @@ int register_all_cocos2dx_coco_studio_manual(lua_State* L)
return 0;
}
int lua_register_cocos2dx_coco_studio_CustomGUIReader(lua_State* tolua_S)
{
tolua_module(tolua_S,"ccs",0);
tolua_beginmodule(tolua_S,"ccs");
tolua_usertype(tolua_S,"ccs.CustomGUIReader");
tolua_cclass(tolua_S,"CustomGUIReader","ccs.CustomGUIReader","cc.Ref",nullptr);
tolua_beginmodule(tolua_S,"CustomGUIReader");
tolua_function(tolua_S,"create",lua_cocos2dx_CustomGUIReader_create);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocostudio::CustomGUIReader).name();
g_luaType[typeName] = "ccs.CustomGUIReader";
g_typeCast["CustomGUIReader"] = "ccs.CustomGUIReader";
tolua_endmodule(tolua_S);
return 1;
}
int register_cocostudio_module(lua_State* L)
{
lua_getglobal(L, "_G");
@ -576,6 +644,7 @@ int register_cocostudio_module(lua_State* L)
{
register_all_cocos2dx_studio(L);
register_all_cocos2dx_coco_studio_manual(L);
lua_register_cocos2dx_coco_studio_CustomGUIReader(L);
}
lua_pop(L, 1);

View File

@ -66,6 +66,7 @@ LOCAL_SRC_FILES += ../manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.cpp \
#cocostudio
LOCAL_SRC_FILES += ../manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp \
../manual/cocostudio/CustomGUIReader.cpp \
../auto/lua_cocos2dx_studio_auto.cpp
#spine

View File

@ -236,6 +236,10 @@
15EFA64E198B3342000C57D3 /* lua.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E718CD8F470087CE3A /* lua.h */; };
15EFA64F198B3342000C57D3 /* luaconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E818CD8F470087CE3A /* luaconf.h */; };
15EFA650198B3342000C57D3 /* lualib.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ABCA1E918CD8F470087CE3A /* lualib.h */; };
566F015F19B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */; };
566F016019B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */; };
566F016119B5EB0F00FCA620 /* CustomGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */; };
566F016219B5EB0F00FCA620 /* CustomGUIReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -364,6 +368,8 @@
1ABCA1FF18CD8F6E0087CE3A /* tolua++.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tolua++.h"; path = "../../../../external/lua/tolua/tolua++.h"; sourceTree = "<group>"; };
2905FACE18CF12E600240AA3 /* lua_cocos2dx_ui_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = lua_cocos2dx_ui_auto.cpp; sourceTree = "<group>"; };
2905FACF18CF12E600240AA3 /* lua_cocos2dx_ui_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = lua_cocos2dx_ui_auto.hpp; sourceTree = "<group>"; };
566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomGUIReader.cpp; sourceTree = "<group>"; };
566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomGUIReader.h; sourceTree = "<group>"; };
C0D9BAFA1974D30000EC35BB /* liblua.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = liblua.a; path = ../../../../external/lua/lua/prebuilt/ios/liblua.a; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -507,6 +513,8 @@
15EFA400198B2AB2000C57D3 /* cocostudio */ = {
isa = PBXGroup;
children = (
566F015D19B5EB0F00FCA620 /* CustomGUIReader.cpp */,
566F015E19B5EB0F00FCA620 /* CustomGUIReader.h */,
15EFA401198B2AB2000C57D3 /* lua_cocos2dx_coco_studio_manual.cpp */,
15EFA402198B2AB2000C57D3 /* lua_cocos2dx_coco_studio_manual.hpp */,
);
@ -738,6 +746,7 @@
15C1C2EE19874CBE00A46ACC /* tolua_fix.h in Headers */,
155C7E2019A71CCC00F08B25 /* LuaSkeletonAnimation.h in Headers */,
15415AB719A71A53004F1E71 /* io.h in Headers */,
566F016119B5EB0F00FCA620 /* CustomGUIReader.h in Headers */,
15C1C2DC19874B4400A46ACC /* xxtea.h in Headers */,
15415AD319A71A53004F1E71 /* timeout.h in Headers */,
15C1C2D5198749BC00A46ACC /* LuaOpengl.h in Headers */,
@ -798,6 +807,7 @@
15EFA642198B32BB000C57D3 /* tolua_fix.h in Headers */,
155C7E2119A71CCE00F08B25 /* LuaSkeletonAnimation.h in Headers */,
15415AB819A71A53004F1E71 /* io.h in Headers */,
566F016219B5EB0F00FCA620 /* CustomGUIReader.h in Headers */,
15EFA62B198B3220000C57D3 /* LuaOpengl.h in Headers */,
15415AD419A71A53004F1E71 /* timeout.h in Headers */,
15EFA62C198B3220000C57D3 /* lua_cocos2dx_deprecated.h in Headers */,
@ -928,6 +938,7 @@
155C7E1E19A71CC700F08B25 /* LuaSkeletonAnimation.cpp in Sources */,
15415AB519A71A53004F1E71 /* io.c in Sources */,
15C1C2CE1987498B00A46ACC /* LuaOpengl.cpp in Sources */,
566F015F19B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */,
15415AC119A71A53004F1E71 /* options.c in Sources */,
155C7E0A19A71C8B00F08B25 /* lua_cocos2dx_network_manual.cpp in Sources */,
15415AD119A71A53004F1E71 /* timeout.c in Sources */,
@ -995,6 +1006,7 @@
155C7E1F19A71CC800F08B25 /* LuaSkeletonAnimation.cpp in Sources */,
15415ACA19A71A53004F1E71 /* serial.c in Sources */,
155C7DEA19A71BDA00F08B25 /* lua_cocos2dx_3d_auto.cpp in Sources */,
566F016019B5EB0F00FCA620 /* CustomGUIReader.cpp in Sources */,
155C7DF119A71C2300F08B25 /* lua_cocos2dx_studio_auto.cpp in Sources */,
155C7E0B19A71C8D00F08B25 /* lua_cocos2dx_network_manual.cpp in Sources */,
15415AAE19A71A53004F1E71 /* except.c in Sources */,

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -56,6 +56,7 @@
<ClCompile Include="..\manual\cocosbuilder\CCBProxy.cpp" />
<ClCompile Include="..\manual\cocosbuilder\lua_cocos2dx_cocosbuilder_manual.cpp" />
<ClCompile Include="..\manual\cocosdenshion\lua_cocos2dx_cocosdenshion_manual.cpp" />
<ClCompile Include="..\manual\cocostudio\CustomGUIReader.cpp" />
<ClCompile Include="..\manual\cocostudio\lua_cocos2dx_coco_studio_manual.cpp" />
<ClCompile Include="..\manual\extension\lua_cocos2dx_extension_manual.cpp" />
<ClCompile Include="..\manual\LuaBasicConversions.cpp" />
@ -117,6 +118,7 @@
<ClInclude Include="..\manual\cocosbuilder\CCBProxy.h" />
<ClInclude Include="..\manual\cocosbuilder\lua_cocos2dx_cocosbuilder_manual.h" />
<ClInclude Include="..\manual\cocosdenshion\lua_cocos2dx_cocosdenshion_manual.h" />
<ClInclude Include="..\manual\cocostudio\CustomGUIReader.h" />
<ClInclude Include="..\manual\cocostudio\lua_cocos2dx_coco_studio_manual.hpp" />
<ClInclude Include="..\manual\extension\lua_cocos2dx_extension_manual.h" />
<ClInclude Include="..\manual\LuaBasicConversions.h" />
@ -208,7 +210,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
@ -217,7 +219,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -243,6 +243,9 @@
<ClCompile Include="..\..\..\..\external\lua\luasocket\wsocket.c">
<Filter>luasocket</Filter>
</ClCompile>
<ClCompile Include="..\manual\cocostudio\CustomGUIReader.cpp">
<Filter>manual\cocostudio</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\auto\lua_cocos2dx_auto.hpp">
@ -422,6 +425,9 @@
<ClInclude Include="..\..\..\..\external\lua\luasocket\wsocket.h">
<Filter>luasocket</Filter>
</ClInclude>
<ClInclude Include="..\manual\cocostudio\CustomGUIReader.h">
<Filter>manual\cocostudio</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\script\CCBReaderLoad.lua">

View File

@ -268,7 +268,7 @@ void EditBox::setPlaceholderFontSize(int fontSize)
_placeholderFontSize = fontSize;
if (_editBoxImpl != nullptr && _placeholderFontName.length() > 0)
{
_editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), _fontSize);
_editBoxImpl->setPlaceholderFont(_placeholderFontName.c_str(), fontSize);
}
}

View File

@ -395,8 +395,6 @@ void EditBoxImplIOS::setFont(const char* pFontName, int fontSize)
_label->setSystemFontName(pFontName);
_label->setSystemFontSize(fontSize);
_labelPlaceHolder->setSystemFontName(pFontName);
_labelPlaceHolder->setSystemFontSize(fontSize);
}
void EditBoxImplIOS::setFontColor(const Color3B& color)
@ -407,7 +405,8 @@ void EditBoxImplIOS::setFontColor(const Color3B& color)
void EditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize)
{
// TODO: need to be implemented.
_labelPlaceHolder->setSystemFontName(pFontName);
_labelPlaceHolder->setSystemFontSize(fontSize);
}
void EditBoxImplIOS::setPlaceholderFontColor(const Color3B& color)

View File

@ -642,6 +642,8 @@
"cocos/editor-support/spine/SlotData.h",
"cocos/editor-support/spine/extension.cpp",
"cocos/editor-support/spine/extension.h",
"cocos/editor-support/spine/proj.win32/libSpine.vcxproj",
"cocos/editor-support/spine/proj.win32/libSpine.vcxproj.filters",
"cocos/editor-support/spine/proj.wp8/libSpine.vcxproj",
"cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.filters",
"cocos/editor-support/spine/proj.wp8/libSpine.vcxproj.user",
@ -948,6 +950,8 @@
"cocos/renderer/CCTextureAtlas.h",
"cocos/renderer/CCTextureCache.cpp",
"cocos/renderer/CCTextureCache.h",
"cocos/renderer/CCTrianglesCommand.cpp",
"cocos/renderer/CCTrianglesCommand.h",
"cocos/renderer/CCVertexIndexBuffer.cpp",
"cocos/renderer/CCVertexIndexBuffer.h",
"cocos/renderer/CCVertexIndexData.cpp",
@ -4032,6 +4036,8 @@
"cocos/scripting/lua-bindings/manual/cocosbuilder/lua_cocos2dx_cocosbuilder_manual.h",
"cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.cpp",
"cocos/scripting/lua-bindings/manual/cocosdenshion/lua_cocos2dx_cocosdenshion_manual.h",
"cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.cpp",
"cocos/scripting/lua-bindings/manual/cocostudio/CustomGUIReader.h",
"cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.cpp",
"cocos/scripting/lua-bindings/manual/cocostudio/lua_cocos2dx_coco_studio_manual.hpp",
"cocos/scripting/lua-bindings/manual/controller/lua_cocos2dx_controller_manual.cpp",

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -24,7 +24,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -33,7 +33,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -73,6 +73,7 @@ static std::function<Layer*()> createFunctions[] =
CL(NodeGlobalZValueTest),
CL(NodeNormalizedPositionTest1),
CL(NodeNormalizedPositionTest2),
CL(NodeNormalizedPositionBugTest),
CL(NodeNameTest),
};
@ -1227,11 +1228,49 @@ void NodeNormalizedPositionTest2::update(float dt)
Size s = Size(_copyContentSize.width*norm, _copyContentSize.height*norm);
setContentSize(s);
CCLOG("s: %f,%f", s.width, s.height);
}
//------------------------------------------------------------------
//
// NodeNormalizedPositionBugTest
//
//------------------------------------------------------------------
NodeNormalizedPositionBugTest::NodeNormalizedPositionBugTest()
: _accum(0)
{
Vec2 position;
position = Vec2(0.5,0.5);
sprite = Sprite::create("Images/grossini.png");
sprite->setNormalizedPosition(position);
addChild(sprite);
scheduleUpdate();
}
std::string NodeNormalizedPositionBugTest::title() const
{
return "NodeNormalizedPositionBugTest";
}
std::string NodeNormalizedPositionBugTest::subtitle() const
{
return "When changing sprite normalizedPosition, the sprite doesn't move!";
}
void NodeNormalizedPositionBugTest::update(float dt)
{
_accum += dt;
// for 5 seconds
float norm = clampf(sinf(_accum), 0, 1.0);
sprite->setNormalizedPosition(Vec2(norm,norm));
}
std::string NodeNameTest::title() const
{
return "getName()/setName()/getChildByName()/enumerateChildren()";

View File

@ -295,6 +295,21 @@ protected:
float _accum;
};
class NodeNormalizedPositionBugTest : public TestCocosNodeDemo
{
public:
CREATE_FUNC(NodeNormalizedPositionBugTest);
virtual std::string title() const override;
virtual std::string subtitle() const override;
protected:
NodeNormalizedPositionBugTest();
void update(float dt);
float _accum;
Sprite *sprite;
};
class NodeNameTest : public TestCocosNodeDemo
{
public:

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -24,7 +24,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -33,7 +33,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -22,7 +22,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -31,7 +31,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -23,7 +23,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -33,7 +33,7 @@
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

View File

@ -48,7 +48,7 @@ skip = *::[^visit$ copyWith.* onEnter.* onExit.* ^description$ getObjectType .*
ActionManagerEx::[initWithDictionary initWithBinary],
DisplayManager::[initDisplayList (s|g)etCurrentDecorativeDisplay getDecorativeDisplayByIndex],
Tween::[(s|g)etMovementBoneData],
GUIReader::[storeFileDesignSize getFileDesignSize getParseCallBackMap getParseObjectMap],
GUIReader::[registerTypeAndCallBack storeFileDesignSize getFileDesignSize getParseCallBackMap getParseObjectMap],
ActionNode::[initWithDictionary],
ActionObject::[initWithDictionary initWithBinary],
BaseData::[copy subtract],