From 8b5340042578ef611d40148559b4e580301601eb Mon Sep 17 00:00:00 2001 From: Stephen Gowen Date: Sat, 25 Nov 2017 17:47:43 -0500 Subject: [PATCH] wip --- .../include/spine/AtlasAttachmentLoader.h | 2 +- .../spine-cpp/include/spine/Attachment.h | 4 +- .../include/spine/AttachmentLoader.h | 4 +- .../include/spine/AttachmentTimeline.h | 2 +- spine-cpp/spine-cpp/include/spine/Bone.h | 2 +- .../include/spine/BoundingBoxAttachment.h | 2 +- .../include/spine/ClippingAttachment.h | 2 +- .../spine-cpp/include/spine/ColorTimeline.h | 2 +- .../spine-cpp/include/spine/Constraint.h | 2 +- .../spine-cpp/include/spine/CurveTimeline.h | 2 +- .../spine-cpp/include/spine/DeformTimeline.h | 2 +- .../include/spine/DrawOrderTimeline.h | 2 +- .../spine-cpp/include/spine/EventTimeline.h | 2 +- .../spine-cpp/include/spine/IkConstraint.h | 2 +- .../include/spine/IkConstraintTimeline.h | 2 +- .../spine-cpp/include/spine/MeshAttachment.h | 2 +- .../spine-cpp/include/spine/PathAttachment.h | 2 +- .../spine-cpp/include/spine/PathConstraint.h | 2 +- .../include/spine/PathConstraintMixTimeline.h | 2 +- .../spine/PathConstraintPositionTimeline.h | 2 +- .../spine/PathConstraintSpacingTimeline.h | 2 +- .../spine-cpp/include/spine/PointAttachment.h | 2 +- .../include/spine/{SpineRTTI.h => RTTI.h} | 40 +-- .../include/spine/RegionAttachment.h | 2 +- .../spine-cpp/include/spine/RotateTimeline.h | 2 +- .../spine-cpp/include/spine/ScaleTimeline.h | 2 +- .../spine-cpp/include/spine/ShearTimeline.h | 2 +- spine-cpp/spine-cpp/include/spine/Skeleton.h | 3 + .../spine-cpp/include/spine/SkeletonBounds.h | 2 +- .../include/spine/SkeletonClipping.h | 2 +- spine-cpp/spine-cpp/include/spine/Slot.h | 1 + spine-cpp/spine-cpp/include/spine/Timeline.h | 4 +- .../include/spine/TransformConstraint.h | 2 +- .../spine/TransformConstraintTimeline.h | 2 +- .../include/spine/TranslateTimeline.h | 2 +- .../include/spine/TwoColorTimeline.h | 2 +- spine-cpp/spine-cpp/include/spine/Updatable.h | 4 +- .../include/spine/VertexAttachment.h | 2 +- .../src/spine/AtlasAttachmentLoader.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Attachment.cpp | 2 +- .../spine-cpp/src/spine/AttachmentLoader.cpp | 2 +- .../src/spine/AttachmentTimeline.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Bone.cpp | 2 +- .../src/spine/BoundingBoxAttachment.cpp | 2 +- .../src/spine/ClippingAttachment.cpp | 2 +- .../spine-cpp/src/spine/ColorTimeline.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Constraint.cpp | 2 +- .../spine-cpp/src/spine/CurveTimeline.cpp | 2 +- .../spine-cpp/src/spine/DeformTimeline.cpp | 2 +- .../spine-cpp/src/spine/DrawOrderTimeline.cpp | 2 +- .../spine-cpp/src/spine/EventTimeline.cpp | 2 +- .../spine-cpp/src/spine/IkConstraint.cpp | 2 +- .../src/spine/IkConstraintTimeline.cpp | 2 +- .../spine-cpp/src/spine/MeshAttachment.cpp | 2 +- .../spine-cpp/src/spine/PathAttachment.cpp | 2 +- .../spine-cpp/src/spine/PathConstraint.cpp | 2 +- .../src/spine/PathConstraintMixTimeline.cpp | 2 +- .../spine/PathConstraintPositionTimeline.cpp | 2 +- .../spine/PathConstraintSpacingTimeline.cpp | 2 +- .../spine-cpp/src/spine/PointAttachment.cpp | 2 +- .../src/spine/{SpineRTTI.cpp => RTTI.cpp} | 16 +- .../spine-cpp/src/spine/RegionAttachment.cpp | 2 +- .../spine-cpp/src/spine/RotateTimeline.cpp | 2 +- .../spine-cpp/src/spine/ScaleTimeline.cpp | 2 +- .../spine-cpp/src/spine/ShearTimeline.cpp | 2 +- .../spine-cpp/src/spine/SkeletonBounds.cpp | 277 +++++++++--------- .../spine-cpp/src/spine/SkeletonClipping.cpp | 202 ++++++++----- spine-cpp/spine-cpp/src/spine/Timeline.cpp | 2 +- .../src/spine/TransformConstraint.cpp | 2 +- .../src/spine/TransformConstraintTimeline.cpp | 2 +- .../spine-cpp/src/spine/TranslateTimeline.cpp | 2 +- .../spine-cpp/src/spine/TwoColorTimeline.cpp | 2 +- spine-cpp/spine-cpp/src/spine/Updatable.cpp | 2 +- .../spine-cpp/src/spine/VertexAttachment.cpp | 2 +- 74 files changed, 371 insertions(+), 312 deletions(-) rename spine-cpp/spine-cpp/include/spine/{SpineRTTI.h => RTTI.h} (69%) rename spine-cpp/spine-cpp/src/spine/{SpineRTTI.cpp => RTTI.cpp} (79%) diff --git a/spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h b/spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h index 2805482af..440b5ac5b 100644 --- a/spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h +++ b/spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h @@ -46,7 +46,7 @@ namespace Spine /// class AtlasAttachmentLoader : public AttachmentLoader { - SPINE_RTTI_DECL; + RTTI_DECL; public: AtlasAttachmentLoader(Vector& inAtlasArray); diff --git a/spine-cpp/spine-cpp/include/spine/Attachment.h b/spine-cpp/spine-cpp/include/spine/Attachment.h index 48c9e2cc1..fdf5a1a58 100644 --- a/spine-cpp/spine-cpp/include/spine/Attachment.h +++ b/spine-cpp/spine-cpp/include/spine/Attachment.h @@ -31,7 +31,7 @@ #ifndef Spine_Attachment_h #define Spine_Attachment_h -#include +#include #include @@ -39,7 +39,7 @@ namespace Spine { class Attachment { - SPINE_RTTI_DECL; + RTTI_DECL; public: Attachment(std::string name); diff --git a/spine-cpp/spine-cpp/include/spine/AttachmentLoader.h b/spine-cpp/spine-cpp/include/spine/AttachmentLoader.h index e194e019b..91f59705e 100644 --- a/spine-cpp/spine-cpp/include/spine/AttachmentLoader.h +++ b/spine-cpp/spine-cpp/include/spine/AttachmentLoader.h @@ -31,7 +31,7 @@ #ifndef Spine_AttachmentLoader_h #define Spine_AttachmentLoader_h -#include +#include #include @@ -47,7 +47,7 @@ namespace Spine class AttachmentLoader { - SPINE_RTTI_DECL; + RTTI_DECL; AttachmentLoader(); diff --git a/spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h b/spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h index b43daf303..07460f6d3 100644 --- a/spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h @@ -46,7 +46,7 @@ namespace Spine class AttachmentTimeline : public Timeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: AttachmentTimeline(int frameCount); diff --git a/spine-cpp/spine-cpp/include/spine/Bone.h b/spine-cpp/spine-cpp/include/spine/Bone.h index 7ae7813e9..9900324be 100644 --- a/spine-cpp/spine-cpp/include/spine/Bone.h +++ b/spine-cpp/spine-cpp/include/spine/Bone.h @@ -47,7 +47,7 @@ namespace Spine /// constraint or application code modifies the world transform after it was computed from the local transform. class Bone : public Updatable { - SPINE_RTTI_DECL; + RTTI_DECL; friend class RotateTimeline; friend class IkConstraint; diff --git a/spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h b/spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h index 1ad9f13d0..996af9f94 100644 --- a/spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h @@ -38,7 +38,7 @@ namespace Spine /// Attachment that has a polygon for bounds checking. class BoundingBoxAttachment : public VertexAttachment { - SPINE_RTTI_DECL; + RTTI_DECL; BoundingBoxAttachment(std::string name); }; diff --git a/spine-cpp/spine-cpp/include/spine/ClippingAttachment.h b/spine-cpp/spine-cpp/include/spine/ClippingAttachment.h index 6b117c374..f0f913ecc 100644 --- a/spine-cpp/spine-cpp/include/spine/ClippingAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/ClippingAttachment.h @@ -39,7 +39,7 @@ namespace Spine class ClippingAttachment : public VertexAttachment { - SPINE_RTTI_DECL; + RTTI_DECL; friend class SkeletonClipping; diff --git a/spine-cpp/spine-cpp/include/spine/ColorTimeline.h b/spine-cpp/spine-cpp/include/spine/ColorTimeline.h index 268e619c2..178e4f13e 100644 --- a/spine-cpp/spine-cpp/include/spine/ColorTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/ColorTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class ColorTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: static const int ENTRIES; diff --git a/spine-cpp/spine-cpp/include/spine/Constraint.h b/spine-cpp/spine-cpp/include/spine/Constraint.h index 18d45cece..aa0122c34 100644 --- a/spine-cpp/spine-cpp/include/spine/Constraint.h +++ b/spine-cpp/spine-cpp/include/spine/Constraint.h @@ -38,7 +38,7 @@ namespace Spine /// The interface for all constraints. class Constraint : public Updatable { - SPINE_RTTI_DECL; + RTTI_DECL; public: Constraint(); diff --git a/spine-cpp/spine-cpp/include/spine/CurveTimeline.h b/spine-cpp/spine-cpp/include/spine/CurveTimeline.h index 38f489b26..a5222e31e 100644 --- a/spine-cpp/spine-cpp/include/spine/CurveTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/CurveTimeline.h @@ -41,7 +41,7 @@ namespace Spine /// Base class for frames that use an interpolation bezier curve. class CurveTimeline : public Timeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: CurveTimeline(int frameCount); diff --git a/spine-cpp/spine-cpp/include/spine/DeformTimeline.h b/spine-cpp/spine-cpp/include/spine/DeformTimeline.h index faf3f848e..1500b77e5 100644 --- a/spine-cpp/spine-cpp/include/spine/DeformTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/DeformTimeline.h @@ -39,7 +39,7 @@ namespace Spine class DeformTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: DeformTimeline(int frameCount); diff --git a/spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h b/spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h index ac1ea0623..60ab70a08 100644 --- a/spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class DrawOrderTimeline : public Timeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: DrawOrderTimeline(int frameCount); diff --git a/spine-cpp/spine-cpp/include/spine/EventTimeline.h b/spine-cpp/spine-cpp/include/spine/EventTimeline.h index 4a844cbd7..e88d50b1a 100644 --- a/spine-cpp/spine-cpp/include/spine/EventTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/EventTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class EventTimeline : public Timeline { - SPINE_RTTI_DECL; + RTTI_DECL; virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/IkConstraint.h b/spine-cpp/spine-cpp/include/spine/IkConstraint.h index b40f06867..c09f8c7cd 100644 --- a/spine-cpp/spine-cpp/include/spine/IkConstraint.h +++ b/spine-cpp/spine-cpp/include/spine/IkConstraint.h @@ -45,7 +45,7 @@ namespace Spine { friend class Skeleton; - SPINE_RTTI_DECL; + RTTI_DECL; public: /// Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified diff --git a/spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h b/spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h index 7b44c8f04..6ab6d35c6 100644 --- a/spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class IkConstraintTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: static const int ENTRIES; diff --git a/spine-cpp/spine-cpp/include/spine/MeshAttachment.h b/spine-cpp/spine-cpp/include/spine/MeshAttachment.h index c29e93fb4..c4c25a7c5 100644 --- a/spine-cpp/spine-cpp/include/spine/MeshAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/MeshAttachment.h @@ -42,7 +42,7 @@ namespace Spine /// Attachment that displays a texture region using a mesh. class MeshAttachment : public VertexAttachment { - SPINE_RTTI_DECL; + RTTI_DECL; friend class AtlasAttachmentLoader; diff --git a/spine-cpp/spine-cpp/include/spine/PathAttachment.h b/spine-cpp/spine-cpp/include/spine/PathAttachment.h index a261daad8..6f0e53993 100644 --- a/spine-cpp/spine-cpp/include/spine/PathAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/PathAttachment.h @@ -37,7 +37,7 @@ namespace Spine { class PathAttachment : public VertexAttachment { - SPINE_RTTI_DECL; + RTTI_DECL; public: PathAttachment(std::string name); diff --git a/spine-cpp/spine-cpp/include/spine/PathConstraint.h b/spine-cpp/spine-cpp/include/spine/PathConstraint.h index e7cf63721..7f6440c48 100644 --- a/spine-cpp/spine-cpp/include/spine/PathConstraint.h +++ b/spine-cpp/spine-cpp/include/spine/PathConstraint.h @@ -47,7 +47,7 @@ namespace Spine { friend class Skeleton; - SPINE_RTTI_DECL; + RTTI_DECL; public: PathConstraint(PathConstraintData& data, Skeleton& skeleton); diff --git a/spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h b/spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h index 030ae5fb3..65d286470 100644 --- a/spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class PathConstraintMixTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h b/spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h index 12c0cffa0..72734d4d8 100644 --- a/spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class PathConstraintPositionTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: static const int ENTRIES; diff --git a/spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h b/spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h index 35c974bff..a0fa2b9fb 100644 --- a/spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: PathConstraintSpacingTimeline(int frameCount); diff --git a/spine-cpp/spine-cpp/include/spine/PointAttachment.h b/spine-cpp/spine-cpp/include/spine/PointAttachment.h index cb9385f2b..6738021a7 100644 --- a/spine-cpp/spine-cpp/include/spine/PointAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/PointAttachment.h @@ -46,7 +46,7 @@ namespace Spine /// class PointAttachment : public Attachment { - SPINE_RTTI_DECL; + RTTI_DECL; public: PointAttachment(std::string name); diff --git a/spine-cpp/spine-cpp/include/spine/SpineRTTI.h b/spine-cpp/spine-cpp/include/spine/RTTI.h similarity index 69% rename from spine-cpp/spine-cpp/include/spine/SpineRTTI.h rename to spine-cpp/spine-cpp/include/spine/RTTI.h index 4ed9806bc..79f413efa 100644 --- a/spine-cpp/spine-cpp/include/spine/SpineRTTI.h +++ b/spine-cpp/spine-cpp/include/spine/RTTI.h @@ -28,48 +28,48 @@ * POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#ifndef Spine_SPINE_RTTI_h -#define Spine_SPINE_RTTI_h +#ifndef Spine_RTTI_h +#define Spine_RTTI_h #include namespace Spine { - class SPINE_RTTI + class RTTI { public: - SPINE_RTTI(const std::string& className); + RTTI(const std::string& className); - SPINE_RTTI(const std::string& className, const SPINE_RTTI& baseSPINE_RTTI); + RTTI(const std::string& className, const RTTI& baseRTTI); const std::string& getClassName() const; - bool isExactly(const SPINE_RTTI& rtti) const; + bool isExactly(const RTTI& rtti) const; - bool derivesFrom(const SPINE_RTTI& rtti) const; + bool derivesFrom(const RTTI& rtti) const; private: // Prevent copying - SPINE_RTTI(const SPINE_RTTI& obj); - SPINE_RTTI& operator=(const SPINE_RTTI& obj); + RTTI(const RTTI& obj); + RTTI& operator=(const RTTI& obj); const std::string m_className; - const SPINE_RTTI *m_pBaseSPINE_RTTI; + const RTTI *m_pBaseRTTI; }; } -#define SPINE_RTTI_DECL \ +#define RTTI_DECL \ public: \ -static const Spine::SPINE_RTTI rtti; \ -virtual const Spine::SPINE_RTTI& getRTTI(); +static const Spine::RTTI rtti; \ +virtual const Spine::RTTI& getRTTI(); -#define SPINE_RTTI_IMPL_NOPARENT(name) \ -const Spine::SPINE_RTTI name::rtti(#name); \ -const Spine::SPINE_RTTI& name::getRTTI() { return rtti; } +#define RTTI_IMPL_NOPARENT(name) \ +const Spine::RTTI name::rtti(#name); \ +const Spine::RTTI& name::getRTTI() { return rtti; } -#define SPINE_RTTI_IMPL(name,parent) \ -const Spine::SPINE_RTTI name::rtti(#name, parent::rtti); \ -const Spine::SPINE_RTTI& name::getRTTI() { return rtti; } +#define RTTI_IMPL(name,parent) \ +const Spine::RTTI name::rtti(#name, parent::rtti); \ +const Spine::RTTI& name::getRTTI() { return rtti; } -#endif /* Spine_SPINE_RTTI_h */ +#endif /* Spine_RTTI_h */ diff --git a/spine-cpp/spine-cpp/include/spine/RegionAttachment.h b/spine-cpp/spine-cpp/include/spine/RegionAttachment.h index 780c5b8ce..5fd982652 100644 --- a/spine-cpp/spine-cpp/include/spine/RegionAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/RegionAttachment.h @@ -46,7 +46,7 @@ namespace Spine /// Attachment that displays a texture region. class RegionAttachment : public Attachment { - SPINE_RTTI_DECL; + RTTI_DECL; friend class AtlasAttachmentLoader; diff --git a/spine-cpp/spine-cpp/include/spine/RotateTimeline.h b/spine-cpp/spine-cpp/include/spine/RotateTimeline.h index ff1fb3ae7..dcc013b71 100644 --- a/spine-cpp/spine-cpp/include/spine/RotateTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/RotateTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class RotateTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: static const int ENTRIES = 2; diff --git a/spine-cpp/spine-cpp/include/spine/ScaleTimeline.h b/spine-cpp/spine-cpp/include/spine/ScaleTimeline.h index dd6db7e65..d0ce306d3 100644 --- a/spine-cpp/spine-cpp/include/spine/ScaleTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/ScaleTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class ScaleTimeline : public TranslateTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/ShearTimeline.h b/spine-cpp/spine-cpp/include/spine/ShearTimeline.h index 74a440876..1916fd8f4 100644 --- a/spine-cpp/spine-cpp/include/spine/ShearTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/ShearTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class ShearTimeline : public TranslateTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/Skeleton.h b/spine-cpp/spine-cpp/include/spine/Skeleton.h index 03ff33d5c..a7bd84ce9 100644 --- a/spine-cpp/spine-cpp/include/spine/Skeleton.h +++ b/spine-cpp/spine-cpp/include/spine/Skeleton.h @@ -51,6 +51,9 @@ namespace Spine class Skeleton { + friend class SkeletonBounds; + friend class SkeletonClipping; + friend class AttachmentTimeline; friend class ColorTimeline; friend class DeformTimeline; diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h b/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h index 432342a1f..424bc2a7f 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonBounds.h @@ -69,7 +69,7 @@ namespace Spine bool aabbIntersectsSkeleton(SkeletonBounds bounds); /// Returns true if the polygon contains the point. - bool containsPoint(Polygon polygon, float x, float y); + bool containsPoint(Polygon* polygon, float x, float y); /// Returns the first bounding box attachment that contains the point, or NULL. When doing many checks, it is usually more /// efficient to only call this method if {@link #aabbcontainsPoint(float, float)} returns true. diff --git a/spine-cpp/spine-cpp/include/spine/SkeletonClipping.h b/spine-cpp/spine-cpp/include/spine/SkeletonClipping.h index 4effd5ede..7a5cde4cd 100644 --- a/spine-cpp/spine-cpp/include/spine/SkeletonClipping.h +++ b/spine-cpp/spine-cpp/include/spine/SkeletonClipping.h @@ -63,7 +63,7 @@ namespace Spine Vector _clippedUVs; Vector _scratch; ClippingAttachment* _clipAttachment; - Vector< Vector > _clippingPolygons; + Vector< Vector* > _clippingPolygons; /** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */ diff --git a/spine-cpp/spine-cpp/include/spine/Slot.h b/spine-cpp/spine-cpp/include/spine/Slot.h index dc55390e2..780db4425 100644 --- a/spine-cpp/spine-cpp/include/spine/Slot.h +++ b/spine-cpp/spine-cpp/include/spine/Slot.h @@ -46,6 +46,7 @@ namespace Spine { friend class VertexAttachment; friend class Skeleton; + friend class SkeletonBounds; friend class SkeletonClipping; friend class AttachmentTimeline; diff --git a/spine-cpp/spine-cpp/include/spine/Timeline.h b/spine-cpp/spine-cpp/include/spine/Timeline.h index 0160e371a..b00db7b28 100644 --- a/spine-cpp/spine-cpp/include/spine/Timeline.h +++ b/spine-cpp/spine-cpp/include/spine/Timeline.h @@ -31,7 +31,7 @@ #ifndef Spine_Timeline_h #define Spine_Timeline_h -#include +#include #include #include #include @@ -43,7 +43,7 @@ namespace Spine class Timeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: Timeline(); diff --git a/spine-cpp/spine-cpp/include/spine/TransformConstraint.h b/spine-cpp/spine-cpp/include/spine/TransformConstraint.h index c2036d4ab..262c3a210 100644 --- a/spine-cpp/spine-cpp/include/spine/TransformConstraint.h +++ b/spine-cpp/spine-cpp/include/spine/TransformConstraint.h @@ -45,7 +45,7 @@ namespace Spine { friend class Skeleton; - SPINE_RTTI_DECL; + RTTI_DECL; public: TransformConstraint(TransformConstraintData& data, Skeleton& skeleton); diff --git a/spine-cpp/spine-cpp/include/spine/TransformConstraintTimeline.h b/spine-cpp/spine-cpp/include/spine/TransformConstraintTimeline.h index 6990e1aa3..e4486d197 100644 --- a/spine-cpp/spine-cpp/include/spine/TransformConstraintTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/TransformConstraintTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class TransformConstraintTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: static const int ENTRIES; diff --git a/spine-cpp/spine-cpp/include/spine/TranslateTimeline.h b/spine-cpp/spine-cpp/include/spine/TranslateTimeline.h index cd48f40b4..6faac140a 100644 --- a/spine-cpp/spine-cpp/include/spine/TranslateTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/TranslateTimeline.h @@ -40,7 +40,7 @@ namespace Spine { class TranslateTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/TwoColorTimeline.h b/spine-cpp/spine-cpp/include/spine/TwoColorTimeline.h index df61adeb9..d70375d34 100644 --- a/spine-cpp/spine-cpp/include/spine/TwoColorTimeline.h +++ b/spine-cpp/spine-cpp/include/spine/TwoColorTimeline.h @@ -37,7 +37,7 @@ namespace Spine { class TwoColorTimeline : public CurveTimeline { - SPINE_RTTI_DECL; + RTTI_DECL; public: virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction); diff --git a/spine-cpp/spine-cpp/include/spine/Updatable.h b/spine-cpp/spine-cpp/include/spine/Updatable.h index cb36e863e..fac634191 100644 --- a/spine-cpp/spine-cpp/include/spine/Updatable.h +++ b/spine-cpp/spine-cpp/include/spine/Updatable.h @@ -31,13 +31,13 @@ #ifndef Spine_Updatable_h #define Spine_Updatable_h -#include +#include namespace Spine { class Updatable { - SPINE_RTTI_DECL; + RTTI_DECL; public: Updatable(); diff --git a/spine-cpp/spine-cpp/include/spine/VertexAttachment.h b/spine-cpp/spine-cpp/include/spine/VertexAttachment.h index 935601df3..33a6fed53 100644 --- a/spine-cpp/spine-cpp/include/spine/VertexAttachment.h +++ b/spine-cpp/spine-cpp/include/spine/VertexAttachment.h @@ -42,7 +42,7 @@ namespace Spine /// An attachment with vertices that are transformed by one or more bones and can be deformed by a slot's vertices. class VertexAttachment : public Attachment { - SPINE_RTTI_DECL; + RTTI_DECL; friend class DeformTimeline; diff --git a/spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp b/spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp index bea6e30e7..0d03bc337 100644 --- a/spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp +++ b/spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp @@ -42,7 +42,7 @@ namespace Spine { - SPINE_RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader); + RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader); AtlasAttachmentLoader::AtlasAttachmentLoader(Vector& inAtlasArray) : AttachmentLoader(), _atlasArray(inAtlasArray) { diff --git a/spine-cpp/spine-cpp/src/spine/Attachment.cpp b/spine-cpp/spine-cpp/src/spine/Attachment.cpp index 93107e041..74a734f27 100644 --- a/spine-cpp/spine-cpp/src/spine/Attachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/Attachment.cpp @@ -34,7 +34,7 @@ namespace Spine { - SPINE_RTTI_IMPL_NOPARENT(Attachment); + RTTI_IMPL_NOPARENT(Attachment); Attachment::Attachment(std::string name) : _name(name) { diff --git a/spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp b/spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp index af55271f2..93e848ab7 100644 --- a/spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp +++ b/spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL_NOPARENT(AttachmentLoader); + RTTI_IMPL_NOPARENT(AttachmentLoader); AttachmentLoader::AttachmentLoader() { diff --git a/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp b/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp index 0fe3f9114..c923a4508 100644 --- a/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(AttachmentTimeline, Timeline); + RTTI_IMPL(AttachmentTimeline, Timeline); AttachmentTimeline::AttachmentTimeline(int frameCount) : Timeline(), _slotIndex(0) { diff --git a/spine-cpp/spine-cpp/src/spine/Bone.cpp b/spine-cpp/spine-cpp/src/spine/Bone.cpp index 7ad89853c..71e119c95 100644 --- a/spine-cpp/spine-cpp/src/spine/Bone.cpp +++ b/spine-cpp/spine-cpp/src/spine/Bone.cpp @@ -38,7 +38,7 @@ namespace Spine { - SPINE_RTTI_IMPL(Bone, Updatable); + RTTI_IMPL(Bone, Updatable); bool Bone::yDown = false; diff --git a/spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp b/spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp index df7a70934..ffa7f7355 100644 --- a/spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp @@ -32,7 +32,7 @@ namespace Spine { - SPINE_RTTI_IMPL(BoundingBoxAttachment, VertexAttachment); + RTTI_IMPL(BoundingBoxAttachment, VertexAttachment); BoundingBoxAttachment::BoundingBoxAttachment(std::string name) : VertexAttachment(name) { diff --git a/spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp b/spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp index 1ad21ba86..c87de561c 100644 --- a/spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp @@ -34,7 +34,7 @@ namespace Spine { - SPINE_RTTI_IMPL(ClippingAttachment, VertexAttachment); + RTTI_IMPL(ClippingAttachment, VertexAttachment); ClippingAttachment::ClippingAttachment(std::string name) : VertexAttachment(name) { diff --git a/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp index 6968fbe75..e7d49f9aa 100644 --- a/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(ColorTimeline, CurveTimeline); + RTTI_IMPL(ColorTimeline, CurveTimeline); const int ColorTimeline::ENTRIES = 5; const int ColorTimeline::PREV_TIME = -5; diff --git a/spine-cpp/spine-cpp/src/spine/Constraint.cpp b/spine-cpp/spine-cpp/src/spine/Constraint.cpp index 206c93b5e..bad9d1a0b 100644 --- a/spine-cpp/spine-cpp/src/spine/Constraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/Constraint.cpp @@ -32,7 +32,7 @@ namespace Spine { - SPINE_RTTI_IMPL(Constraint, Updatable); + RTTI_IMPL(Constraint, Updatable); Constraint::Constraint() { diff --git a/spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp b/spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp index 5d0e58401..ea4047eb2 100644 --- a/spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp @@ -34,7 +34,7 @@ namespace Spine { - SPINE_RTTI_IMPL(CurveTimeline, Timeline); + RTTI_IMPL(CurveTimeline, Timeline); const float CurveTimeline::LINEAR = 0; const float CurveTimeline::STEPPED = 1; diff --git a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp index b9fb2c5ef..ac2a981fe 100644 --- a/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp @@ -42,7 +42,7 @@ namespace Spine { - SPINE_RTTI_IMPL(DeformTimeline, CurveTimeline); + RTTI_IMPL(DeformTimeline, CurveTimeline); DeformTimeline::DeformTimeline(int frameCount) : CurveTimeline(frameCount), _slotIndex(0), _attachment(NULL) { diff --git a/spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp b/spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp index bb84bcdf5..6561db060 100644 --- a/spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(DrawOrderTimeline, Timeline); + RTTI_IMPL(DrawOrderTimeline, Timeline); DrawOrderTimeline::DrawOrderTimeline(int frameCount) : Timeline() { diff --git a/spine-cpp/spine-cpp/src/spine/EventTimeline.cpp b/spine-cpp/spine-cpp/src/spine/EventTimeline.cpp index bcd78be19..2e6f69b03 100644 --- a/spine-cpp/spine-cpp/src/spine/EventTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/EventTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(EventTimeline, Timeline); + RTTI_IMPL(EventTimeline, Timeline); void EventTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp b/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp index f0838c6af..0359854d8 100644 --- a/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/IkConstraint.cpp @@ -39,7 +39,7 @@ namespace Spine { - SPINE_RTTI_IMPL(IkConstraint, Constraint); + RTTI_IMPL(IkConstraint, Constraint); void IkConstraint::apply(Bone& bone, float targetX, float targetY, float alpha) { diff --git a/spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp b/spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp index a2886f8f3..a8c89f715 100644 --- a/spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(IkConstraintTimeline, CurveTimeline); + RTTI_IMPL(IkConstraintTimeline, CurveTimeline); const int IkConstraintTimeline::ENTRIES = 3; const int IkConstraintTimeline::PREV_TIME = -3; diff --git a/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp b/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp index 09793ad9a..6d928a6c3 100644 --- a/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp @@ -32,7 +32,7 @@ namespace Spine { - SPINE_RTTI_IMPL(MeshAttachment, VertexAttachment); + RTTI_IMPL(MeshAttachment, VertexAttachment); MeshAttachment::MeshAttachment(std::string name) : VertexAttachment(name), _regionOffsetX(0), diff --git a/spine-cpp/spine-cpp/src/spine/PathAttachment.cpp b/spine-cpp/spine-cpp/src/spine/PathAttachment.cpp index f997e67a0..54bd9337b 100644 --- a/spine-cpp/spine-cpp/src/spine/PathAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/PathAttachment.cpp @@ -32,7 +32,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PathAttachment, VertexAttachment); + RTTI_IMPL(PathAttachment, VertexAttachment); PathAttachment::PathAttachment(std::string name) : VertexAttachment(name) { diff --git a/spine-cpp/spine-cpp/src/spine/PathConstraint.cpp b/spine-cpp/spine-cpp/src/spine/PathConstraint.cpp index 7dbef8438..6075736c3 100644 --- a/spine-cpp/spine-cpp/src/spine/PathConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/PathConstraint.cpp @@ -45,7 +45,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PathConstraint, Constraint); + RTTI_IMPL(PathConstraint, Constraint); const float PathConstraint::EPSILON = 0.00001f; const int PathConstraint::NONE = -1; diff --git a/spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp b/spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp index 65c4c2998..772eb4e4f 100644 --- a/spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PathConstraintMixTimeline, CurveTimeline); + RTTI_IMPL(PathConstraintMixTimeline, CurveTimeline); void PathConstraintMixTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp b/spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp index 4e6f70d66..2a1d2949b 100644 --- a/spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PathConstraintPositionTimeline, CurveTimeline); + RTTI_IMPL(PathConstraintPositionTimeline, CurveTimeline); const int PathConstraintPositionTimeline::ENTRIES = 2; const int PathConstraintPositionTimeline::PREV_TIME = -2; diff --git a/spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp b/spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp index 17c5ac2aa..474930d7e 100644 --- a/spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline); + RTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline); PathConstraintSpacingTimeline::PathConstraintSpacingTimeline(int frameCount) : PathConstraintPositionTimeline(frameCount) { diff --git a/spine-cpp/spine-cpp/src/spine/PointAttachment.cpp b/spine-cpp/spine-cpp/src/spine/PointAttachment.cpp index b6b93c2ec..d309c8d48 100644 --- a/spine-cpp/spine-cpp/src/spine/PointAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/PointAttachment.cpp @@ -36,7 +36,7 @@ namespace Spine { - SPINE_RTTI_IMPL(PointAttachment, Attachment); + RTTI_IMPL(PointAttachment, Attachment); PointAttachment::PointAttachment(std::string name) : Attachment(name) { diff --git a/spine-cpp/spine-cpp/src/spine/SpineRTTI.cpp b/spine-cpp/spine-cpp/src/spine/RTTI.cpp similarity index 79% rename from spine-cpp/spine-cpp/src/spine/SpineRTTI.cpp rename to spine-cpp/spine-cpp/src/spine/RTTI.cpp index e5fc40ec4..9d271f894 100644 --- a/spine-cpp/spine-cpp/src/spine/SpineRTTI.cpp +++ b/spine-cpp/spine-cpp/src/spine/RTTI.cpp @@ -28,33 +28,33 @@ * POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -#include +#include namespace Spine { - SPINE_RTTI::SPINE_RTTI(const std::string& className) : m_className(className), m_pBaseSPINE_RTTI(NULL) + RTTI::RTTI(const std::string& className) : m_className(className), m_pBaseRTTI(NULL) { // Empty } - SPINE_RTTI::SPINE_RTTI(const std::string& className, const SPINE_RTTI& baseSPINE_RTTI) : m_className(className), m_pBaseSPINE_RTTI(&baseSPINE_RTTI) + RTTI::RTTI(const std::string& className, const RTTI& baseRTTI) : m_className(className), m_pBaseRTTI(&baseRTTI) { // Empty } - const std::string& SPINE_RTTI::getClassName() const + const std::string& RTTI::getClassName() const { return m_className; } - bool SPINE_RTTI::isExactly(const SPINE_RTTI& rtti) const + bool RTTI::isExactly(const RTTI& rtti) const { return (this == &rtti); } - bool SPINE_RTTI::derivesFrom(const SPINE_RTTI& rtti) const + bool RTTI::derivesFrom(const RTTI& rtti) const { - const SPINE_RTTI * pCompare = this; + const RTTI * pCompare = this; while (pCompare) { @@ -63,7 +63,7 @@ namespace Spine return true; } - pCompare = pCompare->m_pBaseSPINE_RTTI; + pCompare = pCompare->m_pBaseRTTI; } return false; diff --git a/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp b/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp index 0ebbb8a41..310a4619b 100644 --- a/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp @@ -38,7 +38,7 @@ namespace Spine { - SPINE_RTTI_IMPL(RegionAttachment, Attachment); + RTTI_IMPL(RegionAttachment, Attachment); const int RegionAttachment::BLX = 0; const int RegionAttachment::BLY = 1; diff --git a/spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp b/spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp index 448d88134..acfeb7db1 100644 --- a/spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(RotateTimeline, CurveTimeline); + RTTI_IMPL(RotateTimeline, CurveTimeline); RotateTimeline::RotateTimeline(int frameCount) : CurveTimeline(frameCount), _boneIndex(0) { diff --git a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp index 3151759eb..f431f589c 100644 --- a/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(ScaleTimeline, TranslateTimeline); + RTTI_IMPL(ScaleTimeline, TranslateTimeline); void ScaleTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp b/spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp index 132967ea8..1f114c972 100644 --- a/spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(ShearTimeline, TranslateTimeline); + RTTI_IMPL(ShearTimeline, TranslateTimeline); void ShearTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp index f4b1a4ce3..217c75deb 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp @@ -33,6 +33,9 @@ #include #include +#include +#include + namespace Spine { SkeletonBounds::SkeletonBounds() : _minX(0), _minY(0), _maxX(0), _maxY(0) @@ -42,63 +45,65 @@ namespace Spine void SkeletonBounds::update(Skeleton& skeleton, bool updateAabb) { -// Vector slots = skeleton._slots; -// int slotCount = slots.Count; -// -// _boundingBoxes.clear(); -// for (int i = 0, n = _polygons.size(); i < n; ++i) -// { -// _polygonPool.push_back(_polygons[i]); -// } -// -// _polygons.clear(); -// -// for (int i = 0; i < slotCount; i++) -// { -// Slot slot = slots.Items[i]; -// BoundingBoxAttachment boundingBox = slot.attachment as BoundingBoxAttachment; -// if (boundingBox == NULL) -// { -// continue; -// } -// _boundingBoxes.push_back(boundingBox); -// -// Polygon* polygonP = NULL; -// int poolCount = _polygonPool.size(); -// if (poolCount > 0) -// { -// polygonP = _polygonPool[poolCount - 1]; -// _polygonPool.erase(poolCount - 1); -// } -// else -// { -// polygonP = new Polygon(); -// } -// -// _polygons.push_back(polygonP); -// -// Polygon& polygon = *polygonP; -// -// int count = boundingBox.worldVerticesLength; -// polygon._count = count; -// if (polygon._vertices.size() < count) -// { -// polygon._vertices.reserve(count); -// } -// boundingBox.computeWorldVertices(slot, polygon._vertices); -// } -// -// if (updateAabb) -// { -// aabbCompute(); -// } -// else -// { -// minX = int.MinValue; -// minY = int.MinValue; -// maxX = int.MaxValue; -// maxY = int.MaxValue; -// } + Vector& slots = skeleton._slots; + int slotCount = static_cast(slots.size()); + + _boundingBoxes.clear(); + for (int i = 0, n = static_cast(_polygons.size()); i < n; ++i) + { + _polygonPool.push_back(_polygons[i]); + } + + _polygons.clear(); + + for (int i = 0; i < slotCount; i++) + { + Slot* slot = slots[i]; + Attachment* attachment = slot->_attachment; + if (attachment == NULL || !attachment->getRTTI().derivesFrom(BoundingBoxAttachment::rtti)) + { + continue; + } + BoundingBoxAttachment* boundingBox = static_cast(attachment); + _boundingBoxes.push_back(boundingBox); + + Polygon* polygonP = NULL; + int poolCount = static_cast(_polygonPool.size()); + if (poolCount > 0) + { + polygonP = _polygonPool[poolCount - 1]; + _polygonPool.erase(poolCount - 1); + } + else + { + Polygon* polygonP = MALLOC(Polygon, 1); + new (polygonP) Polygon(); + } + + _polygons.push_back(polygonP); + + Polygon& polygon = *polygonP; + + int count = boundingBox->getWorldVerticesLength(); + polygon._count = count; + if (polygon._vertices.size() < count) + { + polygon._vertices.reserve(count); + } + boundingBox->computeWorldVertices(*slot, polygon._vertices); + } + + if (updateAabb) + { + aabbCompute(); + } + else + { + _minX = std::numeric_limits::min(); + _minY = std::numeric_limits::min(); + _maxX = std::numeric_limits::max(); + _maxY = std::numeric_limits::max(); + } } bool SkeletonBounds::aabbcontainsPoint(float x, float y) @@ -147,80 +152,82 @@ namespace Spine return _minX < bounds._maxX && _maxX > bounds._minX && _minY < bounds._maxY && _maxY > bounds._minY; } - bool SkeletonBounds::containsPoint(Polygon polygon, float x, float y) + bool SkeletonBounds::containsPoint(Polygon* polygon, float x, float y) { -// float[] vertices = polygon.Vertices; -// int nn = polygon.Count; -// -// int prevIndex = nn - 2; + Vector& vertices = polygon->_vertices; + int nn = polygon->_count; + + int prevIndex = nn - 2; bool inside = false; -// for (int ii = 0; ii < nn; ii += 2) -// { -// float vertexY = vertices[ii + 1]; -// float prevY = vertices[prevIndex + 1]; -// if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) -// { -// float vertexX = vertices[ii]; -// if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) -// { -// inside = !inside; -// } -// } -// prevIndex = ii; -// } + for (int ii = 0; ii < nn; ii += 2) + { + float vertexY = vertices[ii + 1]; + float prevY = vertices[prevIndex + 1]; + if ((vertexY < y && prevY >= y) || (prevY < y && vertexY >= y)) + { + float vertexX = vertices[ii]; + if (vertexX + (y - vertexY) / (prevY - vertexY) * (vertices[prevIndex] - vertexX) < x) + { + inside = !inside; + } + } + prevIndex = ii; + } return inside; } BoundingBoxAttachment* SkeletonBounds::containsPoint(float x, float y) { -// for (int i = 0, n = _polygons.size(); i < n; ++i) -// { -// if (containsPoint(_polygons[i], x, y)) -// { -// return _boundingBoxes[i]; -// } -// } + for (int i = 0, n = static_cast(_polygons.size()); i < n; ++i) + { + if (containsPoint(_polygons[i], x, y)) + { + return _boundingBoxes[i]; + } + } + return NULL; } BoundingBoxAttachment* SkeletonBounds::intersectsSegment(float x1, float y1, float x2, float y2) { -// for (int i = 0, n = _polygons.size(); i < n; ++i) -// { -// if (intersectsSegment(_polygons[i], x1, y1, x2, y2)) -// { -// return _boundingBoxes[i]; -// } -// } + for (int i = 0, n = static_cast(_polygons.size()); i < n; ++i) + { + if (intersectsSegment(_polygons[i], x1, y1, x2, y2)) + { + return _boundingBoxes[i]; + } + } return NULL; } bool SkeletonBounds::intersectsSegment(Polygon* polygon, float x1, float y1, float x2, float y2) { -// Vector& vertices = polygon->_vertices; -// int nn = polygon.Count; -// -// float width12 = x1 - x2, height12 = y1 - y2; -// float det1 = x1 * y2 - y1 * x2; -// float x3 = vertices[nn - 2], y3 = vertices[nn - 1]; -// for (int ii = 0; ii < nn; ii += 2) -// { -// float x4 = vertices[ii], y4 = vertices[ii + 1]; -// float det2 = x3 * y4 - y3 * x4; -// float width34 = x3 - x4, height34 = y3 - y4; -// float det3 = width12 * height34 - height12 * width34; -// float x = (det1 * width34 - width12 * det2) / det3; -// if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) -// { -// float y = (det1 * height34 - height12 * det2) / det3; -// if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) -// { -// return true; -// } -// } -// x3 = x4; -// y3 = y4; -// } + Vector& vertices = polygon->_vertices; + int nn = polygon->_count; + + float width12 = x1 - x2, height12 = y1 - y2; + float det1 = x1 * y2 - y1 * x2; + float x3 = vertices[nn - 2], y3 = vertices[nn - 1]; + for (int ii = 0; ii < nn; ii += 2) + { + float x4 = vertices[ii], y4 = vertices[ii + 1]; + float det2 = x3 * y4 - y3 * x4; + float width34 = x3 - x4, height34 = y3 - y4; + float det3 = width12 * height34 - height12 * width34; + float x = (det1 * width34 - width12 * det2) / det3; + if (((x >= x3 && x <= x4) || (x >= x4 && x <= x3)) && ((x >= x1 && x <= x2) || (x >= x2 && x <= x1))) + { + float y = (det1 * height34 - height12 * det2) / det3; + if (((y >= y3 && y <= y4) || (y >= y4 && y <= y3)) && ((y >= y1 && y <= y2) || (y >= y2 && y <= y1))) + { + return true; + } + } + x3 = x4; + y3 = y4; + } + return false; } @@ -243,25 +250,29 @@ namespace Spine void SkeletonBounds::aabbCompute() { -// float minX = int.MaxValue, minY = int.MaxValue, maxX = int.MinValue, maxY = int.MinValue; -// for (int i = 0, n = _polygons.size(); i < n; i++) -// { -// Polygon* polygon = _polygons[i]; -// Vector& vertices = polygon->_vertices; -// for (int ii = 0, nn = polygon.Count; ii < nn; ii += 2) -// { -// float x = vertices[ii]; -// float y = vertices[ii + 1]; -// minX = Math.Min(minX, x); -// minY = Math.Min(minY, y); -// maxX = Math.Max(maxX, x); -// maxY = Math.Max(maxY, y); -// } -// } -// _minX = minX; -// _minY = minY; -// _maxX = maxX; -// _maxY = maxY; + float minX = std::numeric_limits::min(); + float minY = std::numeric_limits::min(); + float maxX = std::numeric_limits::max(); + float maxY = std::numeric_limits::max(); + + for (int i = 0, n = static_cast(_polygons.size()); i < n; ++i) + { + Polygon* polygon = _polygons[i]; + Vector& vertices = polygon->_vertices; + for (int ii = 0, nn = polygon->_count; ii < nn; ii += 2) + { + float x = vertices[ii]; + float y = vertices[ii + 1]; + minX = MIN(minX, x); + minY = MIN(minY, y); + maxX = MAX(maxX, x); + maxY = MAX(maxY, y); + } + } + _minX = minX; + _minY = minY; + _maxX = maxX; + _maxY = maxY; } } diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp index c3684bfb3..5132b8b88 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp @@ -45,19 +45,28 @@ namespace Spine int SkeletonClipping::clipStart(Slot& slot, ClippingAttachment* clip) { -// if (clipAttachment != NULL) return 0; -// clipAttachment = clip; -// -// int n = clip.worldVerticesLength; -// float[] vertices = clippingPolygon.Resize(n).Items; -// clip.ComputeWorldVertices(slot, 0, n, vertices, 0, 2); -// makeClockwise(clippingPolygon); -// clippingPolygons = triangulator.Decompose(clippingPolygon, triangulator.Triangulate(clippingPolygon)); -// foreach (var polygon in clippingPolygons) { -// makeClockwise(polygon); -// polygon.push_back(polygon.Items[0]); -// polygon.push_back(polygon.Items[1]); -// } + if (_clipAttachment != NULL) + { + return 0; + } + + _clipAttachment = clip; + + int n = clip->getWorldVerticesLength(); + _clippingPolygon.reserve(n); + clip->computeWorldVertices(slot, 0, n, _clippingPolygon, 0, 2); + makeClockwise(_clippingPolygon); + _clippingPolygons = _triangulator.decompose(_clippingPolygon, _triangulator.triangulate(_clippingPolygon)); + + for (Vector** i = _clippingPolygons.begin(); i != _clippingPolygons.end(); ++i) + { + Vector* polygonP = (*i); + Vector& polygon = *polygonP; + makeClockwise(polygon); + polygon.push_back(polygon[0]); + polygon.push_back(polygon[1]); + } + return static_cast(_clippingPolygons.size()); } @@ -85,34 +94,41 @@ namespace Spine void SkeletonClipping::clipTriangles(Vector& vertices, int verticesLength, Vector& triangles, int trianglesLength, Vector& uvs) { -// Vector clipOutput = _clipOutput, clippedVertices = _clippedVertices; -// var clippedTriangles = _clippedTriangles; -// var polygons = clippingPolygons.Items; -// int polygonsCount = clippingPolygons.Count; -// -// int index = 0; -// clippedVertices.Clear(); -// clippedUVs.Clear(); -// clippedTriangles.Clear(); -// //outer: -// for (int i = 0; i < trianglesLength; i += 3) { -// int vertexOffset = triangles[i] << 1; -// float x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1]; -// float u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1]; -// -// vertexOffset = triangles[i + 1] << 1; -// float x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1]; -// float u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1]; -// -// vertexOffset = triangles[i + 2] << 1; -// float x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1]; -// float u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1]; -// -// for (int p = 0; p < polygonsCount; p++) { -// int s = clippedVertices.Count; -// if (clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) { + Vector& clipOutput = _clipOutput, clippedVertices = _clippedVertices; + Vector& clippedTriangles = _clippedTriangles; + Vector< Vector* >& polygons = _clippingPolygons; + int polygonsCount = _clippingPolygons.size(); + + int index = 0; + clippedVertices.clear(); + _clippedUVs.clear(); + clippedTriangles.clear(); + + //outer: + for (int i = 0; i < trianglesLength; i += 3) + { + int vertexOffset = triangles[i] << 1; + float x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1]; + float u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1]; + + vertexOffset = triangles[i + 1] << 1; + float x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1]; + float u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1]; + + vertexOffset = triangles[i + 2] << 1; + float x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1]; + float u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1]; + + for (int p = 0; p < polygonsCount; p++) + { + int s = clippedVertices.size(); +// if (clip(x1, y1, x2, y2, x3, y3, polygons[p], clipOutput)) +// { // int clipOutputLength = clipOutput.Count; -// if (clipOutputLength == 0) continue; +// if (clipOutputLength == 0) +// { +// continue; +// } // float d0 = y2 - y3, d1 = x3 - x2, d2 = x1 - x3, d4 = y3 - y1; // float d = 1 / (d0 * d2 + d1 * (y1 - y3)); // @@ -120,7 +136,8 @@ namespace Spine // float[] clipOutputItems = clipOutput.Items; // float[] clippedVerticesItems = clippedVertices.Resize(s + clipOutputCount * 2).Items; // float[] clippedUVsItems = clippedUVs.Resize(s + clipOutputCount * 2).Items; -// for (int ii = 0; ii < clipOutputLength; ii += 2) { +// for (int ii = 0; ii < clipOutputLength; ii += 2) +// { // float x = clipOutputItems[ii], y = clipOutputItems[ii + 1]; // clippedVerticesItems[s] = x; // clippedVerticesItems[s + 1] = y; @@ -136,7 +153,8 @@ namespace Spine // s = clippedTriangles.Count; // int[] clippedTrianglesItems = clippedTriangles.Resize(s + 3 * (clipOutputCount - 2)).Items; // clipOutputCount--; -// for (int ii = 1; ii < clipOutputCount; ii++) { +// for (int ii = 1; ii < clipOutputCount; ii++) +// { // clippedTrianglesItems[s] = index; // clippedTrianglesItems[s + 1] = index + ii; // clippedTrianglesItems[s + 2] = index + ii + 1; @@ -144,7 +162,8 @@ namespace Spine // } // index += clipOutputCount + 1; // } -// else { +// else +// { // float[] clippedVerticesItems = clippedVertices.Resize(s + 3 * 2).Items; // float[] clippedUVsItems = clippedUVs.Resize(s + 3 * 2).Items; // clippedVerticesItems[s] = x1; @@ -169,8 +188,8 @@ namespace Spine // index += 3; // break; //continue outer; // } -// } -// } + } + } } bool SkeletonClipping::isClipping() @@ -180,15 +199,18 @@ namespace Spine bool SkeletonClipping::clip(float x1, float y1, float x2, float y2, float x3, float y3, Vector& clippingArea, Vector& output) { -// var originalOutput = output; + Vector originalOutput = output; bool clipped = false; // // // Avoid copy at the end. // Vector input = NULL; -// if (clippingArea.Count % 4 >= 2) { +// if (clippingArea.Count % 4 >= 2) +// { // input = output; // output = scratch; -// } else { +// } +// else +// { // input = scratch; // } // @@ -205,19 +227,24 @@ namespace Spine // // Vector clippingVertices = clippingArea.Items; // int clippingVerticesLast = clippingArea.Count - 4; -// for (int i = 0; ; i += 2) { +// for (int i = 0; ; i += 2) +// { // float edgeX = clippingVertices[i], edgeY = clippingVertices[i + 1]; // float edgeX2 = clippingVertices[i + 2], edgeY2 = clippingVertices[i + 3]; // float deltaX = edgeX - edgeX2, deltaY = edgeY - edgeY2; // // Vector inputVertices = input.Items; // int inputVerticesLength = input.Count - 2, outputStart = output.Count; -// for (int ii = 0; ii < inputVerticesLength; ii += 2) { +// for (int ii = 0; ii < inputVerticesLength; ii += 2) +// { // float inputX = inputVertices[ii], inputY = inputVertices[ii + 1]; // float inputX2 = inputVertices[ii + 2], inputY2 = inputVertices[ii + 3]; // bool side2 = deltaX * (inputY2 - edgeY2) - deltaY * (inputX2 - edgeX2) > 0; -// if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) { -// if (side2) { // v1 inside, v2 inside +// if (deltaX * (inputY - edgeY2) - deltaY * (inputX - edgeX2) > 0) +// { +// if (side2) +// { +// // v1 inside, v2 inside // output.push_back(inputX2); // output.push_back(inputY2); // continue; @@ -228,7 +255,9 @@ namespace Spine // output.push_back(edgeX + (edgeX2 - edgeX) * ua); // output.push_back(edgeY + (edgeY2 - edgeY) * ua); // } -// else if (side2) { // v1 outside, v2 inside +// else if (side2) +// { +// // v1 outside, v2 inside // float c0 = inputY2 - inputY, c2 = inputX2 - inputX; // float ua = (c2 * (edgeY - inputY) - c0 * (edgeX - inputX)) / (c0 * (edgeX2 - edgeX) - c2 * (edgeY2 - edgeY)); // output.push_back(edgeX + (edgeX2 - edgeX) * ua); @@ -239,7 +268,9 @@ namespace Spine // clipped = true; // } // -// if (outputStart == output.Count) { // All edges outside. +// if (outputStart == output.Count) +// { +// // All edges outside. // originalOutput.Clear(); // return true; // } @@ -247,19 +278,26 @@ namespace Spine // output.push_back(output.Items[0]); // output.push_back(output.Items[1]); // -// if (i == clippingVerticesLast) break; +// if (i == clippingVerticesLast) +// { +// break; +// } // var temp = output; // output = input; // output.Clear(); // input = temp; // } // -// if (originalOutput != output) { +// if (originalOutput != output) +// { // originalOutput.Clear(); -// for (int i = 0, n = output.Count - 2; i < n; i++) { +// for (int i = 0, n = output.Count - 2; i < n; i++) +// { // originalOutput.push_back(output.Items[i]); // } -// } else { +// } +// else +// { // originalOutput.Resize(originalOutput.Count - 2); // } @@ -268,26 +306,32 @@ namespace Spine void SkeletonClipping::makeClockwise(Vector& polygon) { -// Vector vertices = polygon.Items; -// int verticeslength = polygon.Count; -// -// float area = vertices[verticeslength - 2] * vertices[1] - vertices[0] * vertices[verticeslength - 1], p1x, p1y, p2x, p2y; -// for (int i = 0, n = verticeslength - 3; i < n; i += 2) { -// p1x = vertices[i]; -// p1y = vertices[i + 1]; -// p2x = vertices[i + 2]; -// p2y = vertices[i + 3]; -// area += p1x * p2y - p2x * p1y; -// } -// if (area < 0) return; -// -// for (int i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) { -// float x = vertices[i], y = vertices[i + 1]; -// int other = lastX - i; -// vertices[i] = vertices[other]; -// vertices[i + 1] = vertices[other + 1]; -// vertices[other] = x; -// vertices[other + 1] = y; -// } + int verticeslength = static_cast(polygon.size()); + + float area = polygon[verticeslength - 2] * polygon[1] - polygon[0] * polygon[verticeslength - 1], p1x, p1y, p2x, p2y; + + for (int i = 0, n = verticeslength - 3; i < n; i += 2) + { + p1x = polygon[i]; + p1y = polygon[i + 1]; + p2x = polygon[i + 2]; + p2y = polygon[i + 3]; + area += p1x * p2y - p2x * p1y; + } + + if (area < 0) + { + return; + } + + for (int i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) + { + float x = polygon[i], y = polygon[i + 1]; + int other = lastX - i; + polygon[i] = polygon[other]; + polygon[i + 1] = polygon[other + 1]; + polygon[other] = x; + polygon[other + 1] = y; + } } } diff --git a/spine-cpp/spine-cpp/src/spine/Timeline.cpp b/spine-cpp/spine-cpp/src/spine/Timeline.cpp index ddd0d5fe6..6dac2f210 100644 --- a/spine-cpp/spine-cpp/src/spine/Timeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/Timeline.cpp @@ -35,7 +35,7 @@ namespace Spine { - SPINE_RTTI_IMPL_NOPARENT(Timeline); + RTTI_IMPL_NOPARENT(Timeline); Timeline::Timeline() { diff --git a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp index 166713279..3f970e502 100644 --- a/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp +++ b/spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp @@ -39,7 +39,7 @@ namespace Spine { - SPINE_RTTI_IMPL(TransformConstraint, Constraint); + RTTI_IMPL(TransformConstraint, Constraint); TransformConstraint::TransformConstraint(TransformConstraintData& data, Skeleton& skeleton) : Constraint(), _data(data), diff --git a/spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp b/spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp index 33335732f..01914067f 100644 --- a/spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(TransformConstraintTimeline, CurveTimeline); + RTTI_IMPL(TransformConstraintTimeline, CurveTimeline); const int TransformConstraintTimeline::ENTRIES = 5; const int TransformConstraintTimeline::PREV_TIME = -5; diff --git a/spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp b/spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp index 05afdad26..f7ae4abbe 100644 --- a/spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(TranslateTimeline, CurveTimeline); + RTTI_IMPL(TranslateTimeline, CurveTimeline); void TranslateTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/TwoColorTimeline.cpp b/spine-cpp/spine-cpp/src/spine/TwoColorTimeline.cpp index 1062f481a..9f092c488 100644 --- a/spine-cpp/spine-cpp/src/spine/TwoColorTimeline.cpp +++ b/spine-cpp/spine-cpp/src/spine/TwoColorTimeline.cpp @@ -40,7 +40,7 @@ namespace Spine { - SPINE_RTTI_IMPL(TwoColorTimeline, CurveTimeline); + RTTI_IMPL(TwoColorTimeline, CurveTimeline); void TwoColorTimeline::apply(Skeleton& skeleton, float lastTime, float time, Vector& events, float alpha, MixPose pose, MixDirection direction) { diff --git a/spine-cpp/spine-cpp/src/spine/Updatable.cpp b/spine-cpp/spine-cpp/src/spine/Updatable.cpp index e40d01725..598955a9a 100644 --- a/spine-cpp/spine-cpp/src/spine/Updatable.cpp +++ b/spine-cpp/spine-cpp/src/spine/Updatable.cpp @@ -32,7 +32,7 @@ namespace Spine { - SPINE_RTTI_IMPL_NOPARENT(Updatable); + RTTI_IMPL_NOPARENT(Updatable); Updatable::Updatable() { diff --git a/spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp b/spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp index 9968a77ce..6cfa69a34 100644 --- a/spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp +++ b/spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp @@ -37,7 +37,7 @@ namespace Spine { - SPINE_RTTI_IMPL(VertexAttachment, Attachment); + RTTI_IMPL(VertexAttachment, Attachment); VertexAttachment::VertexAttachment(std::string name) : Attachment(name), _worldVerticesLength(0), _id(getNextID()) {