Skip to content

Commit

Permalink
V2.2.0 spine 3.7 (#1754)
Browse files Browse the repository at this point in the history
* Remove old library

* upgrade spine

* Remove old files

* upgrade spine

* Upgrade spine

* Upgrade spine

* Roll back to 3.7

* Replace tab to 4 space

* Support spine vertex effect
Add mesh debug graphics

* modify license

* Modify cocos2dx-files.json

* Add bounding box

* Add bounding box

* Refine code
  • Loading branch information
sunnylanwanjun authored and jareguo committed May 29, 2019
1 parent baa5aaf commit 0814e0b
Show file tree
Hide file tree
Showing 205 changed files with 44,592 additions and 18,692 deletions.
1,410 changes: 888 additions & 522 deletions build/cocos2d_libs.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

163 changes: 112 additions & 51 deletions build/libcocos2d.vcxproj

Large diffs are not rendered by default.

423 changes: 333 additions & 90 deletions build/libcocos2d.vcxproj.filters

Large diffs are not rendered by default.

108 changes: 65 additions & 43 deletions cocos/editor-support/Android.mk
Expand Up @@ -20,51 +20,73 @@ MiddlewareManager.cpp \

ifeq ($(USE_SPINE),1)
LOCAL_SRC_FILES += \
spine/Animation.c \
spine/AnimationState.c \
spine/AnimationStateData.c \
spine/Array.c \
spine/Atlas.c \
spine/AtlasAttachmentLoader.c \
spine/Attachment.c \
spine/AttachmentLoader.c \
spine/Bone.c \
spine/BoneData.c \
spine/BoundingBoxAttachment.c \
spine/ClippingAttachment.c \
spine/Color.c \
spine/Event.c \
spine/EventData.c \
spine/extension.c \
spine/IkConstraint.c \
spine/IkConstraintData.c \
spine/Json.c \
spine/MeshAttachment.c \
spine/PathAttachment.c \
spine/PathConstraint.c \
spine/PathConstraintData.c \
spine/PointAttachment.c \
spine/RegionAttachment.c \
spine/Skeleton.c \
spine/SkeletonBinary.c \
spine/SkeletonBounds.c \
spine/SkeletonClipping.c \
spine/SkeletonData.c \
spine/SkeletonJson.c \
spine/Skin.c \
spine/Slot.c \
spine/SlotData.c \
spine/TransformConstraint.c \
spine/TransformConstraintData.c \
spine/Triangulator.c \
spine/VertexAttachment.c \
spine/VertexEffect.c \
spine/Animation.cpp \
spine/AnimationState.cpp \
spine/AnimationStateData.cpp \
spine/Atlas.cpp \
spine/AtlasAttachmentLoader.cpp \
spine/Attachment.cpp \
spine/AttachmentLoader.cpp \
spine/AttachmentTimeline.cpp \
spine/Bone.cpp \
spine/BoneData.cpp \
spine/BoundingBoxAttachment.cpp \
spine/ClippingAttachment.cpp \
spine/ColorTimeline.cpp \
spine/Constraint.cpp \
spine/CurveTimeline.cpp \
spine/DeformTimeline.cpp \
spine/DrawOrderTimeline.cpp \
spine/Event.cpp \
spine/EventData.cpp \
spine/EventTimeline.cpp \
spine/Extension.cpp \
spine/IkConstraint.cpp \
spine/IkConstraintData.cpp \
spine/IkConstraintTimeline.cpp \
spine/Json.cpp \
spine/LinkedMesh.cpp \
spine/MathUtil.cpp \
spine/MeshAttachment.cpp \
spine/PathAttachment.cpp \
spine/PathConstraint.cpp \
spine/PathConstraintData.cpp \
spine/PathConstraintMixTimeline.cpp \
spine/PathConstraintPositionTimeline.cpp \
spine/PathConstraintSpacingTimeline.cpp \
spine/PointAttachment.cpp \
spine/RegionAttachment.cpp \
spine/RotateTimeline.cpp \
spine/RTTI.cpp \
spine/ScaleTimeline.cpp \
spine/ShearTimeline.cpp \
spine/Skeleton.cpp \
spine/SkeletonBinary.cpp \
spine/SkeletonBounds.cpp \
spine/SkeletonClipping.cpp \
spine/SkeletonData.cpp \
spine/SkeletonJson.cpp \
spine/Skin.cpp \
spine/Slot.cpp \
spine/SlotData.cpp \
spine/SpineObject.cpp \
spine/TextureLoader.cpp \
spine/Timeline.cpp \
spine/TransformConstraint.cpp \
spine/TransformConstraintData.cpp \
spine/TransformConstraintTimeline.cpp \
spine/TranslateTimeline.cpp \
spine/Triangulator.cpp \
spine/TwoColorTimeline.cpp \
spine/Updatable.cpp \
spine/VertexAttachment.cpp \
spine/VertexEffect.cpp \
spine-creator-support/AttachmentVertices.cpp \
spine-creator-support/CreatorAttachmentLoader.cpp \
spine-creator-support/SpineAnimation.cpp \
spine-creator-support/SpineRenderer.cpp \
spine-creator-support/spine-cocos2dx.cpp \
spine-creator-support/SkeletonAnimation.cpp \
spine-creator-support/SkeletonDataMgr.cpp \
spine-creator-support/SkeletonRenderer.cpp \
spine-creator-support/spine-cocos2dx.cpp \
spine-creator-support/VertexEffectDelegate.cpp \
../scripting/js-bindings/manual/jsb_spine_manual.cpp \
../scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.cpp
endif # USE_SPINE
Expand Down
2 changes: 1 addition & 1 deletion cocos/editor-support/MiddlewareMacro.h
Expand Up @@ -29,7 +29,7 @@
// render info int capacity
#define INIT_RENDER_INFO_BUFFER_SIZE 1024000
// fill debug data max capacity
#define MAX_DEBUG_BUFFER_SIZE 40960
#define MAX_DEBUG_BUFFER_SIZE 409600
// type array pool min size
#define MIN_TYPE_ARRAY_SIZE 1024

Expand Down
53 changes: 25 additions & 28 deletions cocos/editor-support/spine-creator-support/AttachmentVertices.cpp
@@ -1,31 +1,30 @@
/******************************************************************************
* Spine Runtimes Software License v2.5
* Spine Runtimes License Agreement
* Last updated May 1, 2019. Replaces all prior versions.
*
* Copyright (c) 2013-2016, Esoteric Software
* All rights reserved.
* Copyright (c) 2013-2019, Esoteric Software LLC
*
* You are granted a perpetual, non-exclusive, non-sublicensable, and
* non-transferable license to use, install, execute, and perform the Spine
* Runtimes software and derivative works solely for personal or internal
* use. Without the written permission of Esoteric Software (see Section 2 of
* the Spine Software License Agreement), you may not (a) modify, translate,
* adapt, or develop new applications using the Spine Runtimes or otherwise
* create derivative works or improvements of the Spine Runtimes or (b) remove,
* delete, alter, or obscure any trademarks or any copyright, trademark, patent,
* or other intellectual property or proprietary rights notices on or in the
* Software, including any copy thereof. Redistributions in binary or source
* form must include this license and terms.
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
* USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
* INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/

#include "spine-creator-support/AttachmentVertices.h"
Expand All @@ -34,8 +33,7 @@ USING_NS_CC;

namespace spine {

AttachmentVertices::AttachmentVertices (middleware::Texture2D* texture, int verticesCount, unsigned short* triangles, int trianglesCount)
{
AttachmentVertices::AttachmentVertices (middleware::Texture2D* texture, int verticesCount, unsigned short* triangles, int trianglesCount) {
_texture = texture;

_triangles = new middleware::Triangles();
Expand All @@ -45,8 +43,7 @@ namespace spine {
_triangles->indexCount = trianglesCount;
}

AttachmentVertices::~AttachmentVertices ()
{
AttachmentVertices::~AttachmentVertices () {
delete [] _triangles->verts;
delete _triangles;
}
Expand Down
50 changes: 24 additions & 26 deletions cocos/editor-support/spine-creator-support/AttachmentVertices.h
@@ -1,31 +1,30 @@
/******************************************************************************
* Spine Runtimes Software License v2.5
* Spine Runtimes License Agreement
* Last updated May 1, 2019. Replaces all prior versions.
*
* Copyright (c) 2013-2016, Esoteric Software
* All rights reserved.
* Copyright (c) 2013-2019, Esoteric Software LLC
*
* You are granted a perpetual, non-exclusive, non-sublicensable, and
* non-transferable license to use, install, execute, and perform the Spine
* Runtimes software and derivative works solely for personal or internal
* use. Without the written permission of Esoteric Software (see Section 2 of
* the Spine Software License Agreement), you may not (a) modify, translate,
* adapt, or develop new applications using the Spine Runtimes or otherwise
* create derivative works or improvements of the Spine Runtimes or (b) remove,
* delete, alter, or obscure any trademarks or any copyright, trademark, patent,
* or other intellectual property or proprietary rights notices on or in the
* Software, including any copy thereof. Redistributions in binary or source
* form must include this license and terms.
* Integration of the Spine Runtimes into software or otherwise creating
* derivative works of the Spine Runtimes is permitted under the terms and
* conditions of Section 2 of the Spine Editor License Agreement:
* http://esotericsoftware.com/spine-editor-license
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
* USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* Otherwise, it is permitted to integrate the Spine Runtimes into software
* or otherwise create derivative works of the Spine Runtimes (collectively,
* "Products"), provided that each user of the Products must obtain their own
* Spine Editor license and redistribution of the Products in any form must
* include this license and copyright notice.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
* INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/

#pragma once
Expand All @@ -37,8 +36,7 @@ namespace spine{
/**
* Store attachment vertex and indice list
*/
class AttachmentVertices
{
class AttachmentVertices {
public:
AttachmentVertices (cocos2d::middleware::Texture2D* texture, int verticesCount, unsigned short* triangles, int trianglesCount);
virtual ~AttachmentVertices ();
Expand Down
121 changes: 0 additions & 121 deletions cocos/editor-support/spine-creator-support/CreatorAttachmentLoader.cpp

This file was deleted.

0 comments on commit 0814e0b

Please sign in to comment.