mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Changing RTTI to SPINE_RTTI and RTTI.h/cpp to SpineRTTI.h/cpp
This commit is contained in:
parent
44194018ad
commit
5bba269f13
@ -45,7 +45,7 @@ namespace Spine
|
|||||||
///
|
///
|
||||||
class AtlasAttachmentLoader : public AttachmentLoader
|
class AtlasAttachmentLoader : public AttachmentLoader
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AtlasAttachmentLoader (Vector<Atlas*>& inAtlasArray) : _atlasArray(inAtlasArray)
|
AtlasAttachmentLoader (Vector<Atlas*>& inAtlasArray) : _atlasArray(inAtlasArray)
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_Attachment_h
|
#ifndef Spine_Attachment_h
|
||||||
#define Spine_Attachment_h
|
#define Spine_Attachment_h
|
||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/SpineRTTI.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class Attachment
|
class Attachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Attachment(std::string name);
|
Attachment(std::string name);
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_AttachmentLoader_h
|
#ifndef Spine_AttachmentLoader_h
|
||||||
#define Spine_AttachmentLoader_h
|
#define Spine_AttachmentLoader_h
|
||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/SpineRTTI.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ namespace Spine
|
|||||||
|
|
||||||
class AttachmentLoader
|
class AttachmentLoader
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
/// @return May be NULL to not load any attachment.
|
/// @return May be NULL to not load any attachment.
|
||||||
virtual RegionAttachment* newRegionAttachment(Skin& skin, std::string name, std::string path) = 0;
|
virtual RegionAttachment* newRegionAttachment(Skin& skin, std::string name, std::string path) = 0;
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace Spine
|
|||||||
|
|
||||||
class AttachmentTimeline : public Timeline
|
class AttachmentTimeline : public Timeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AttachmentTimeline(int frameCount)
|
AttachmentTimeline(int frameCount)
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace Spine
|
|||||||
/// constraint or application code modifies the world transform after it was computed from the local transform.
|
/// constraint or application code modifies the world transform after it was computed from the local transform.
|
||||||
class Bone : public Updatable
|
class Bone : public Updatable
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
friend class RotateTimeline;
|
friend class RotateTimeline;
|
||||||
friend class IkConstraint;
|
friend class IkConstraint;
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace Spine
|
|||||||
/// Attachment that has a polygon for bounds checking.
|
/// Attachment that has a polygon for bounds checking.
|
||||||
class BoundingBoxAttachment : public VertexAttachment
|
class BoundingBoxAttachment : public VertexAttachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
BoundingBoxAttachment(std::string name);
|
BoundingBoxAttachment(std::string name);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -39,7 +39,7 @@ namespace Spine
|
|||||||
|
|
||||||
class ClippingAttachment : public VertexAttachment
|
class ClippingAttachment : public VertexAttachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClippingAttachment(std::string name);
|
ClippingAttachment(std::string name);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class ColorTimeline : public CurveTimeline
|
class ColorTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 5;
|
// public const int ENTRIES = 5;
|
||||||
// protected const int PREV_TIME = -5, PREV_R = -4, PREV_G = -3, PREV_B = -2, PREV_A = -1;
|
// protected const int PREV_TIME = -5, PREV_R = -4, PREV_G = -3, PREV_B = -2, PREV_A = -1;
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace Spine
|
|||||||
/// The interface for all constraints.
|
/// The interface for all constraints.
|
||||||
class Constraint : public Updatable
|
class Constraint : public Updatable
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Constraint();
|
Constraint();
|
||||||
|
|||||||
@ -41,7 +41,7 @@ namespace Spine
|
|||||||
/// Base class for frames that use an interpolation bezier curve.
|
/// Base class for frames that use an interpolation bezier curve.
|
||||||
class CurveTimeline : public Timeline
|
class CurveTimeline : public Timeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CurveTimeline(int frameCount);
|
CurveTimeline(int frameCount);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class DeformTimeline : CurveTimeline
|
class DeformTimeline : CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// internal int slotIndex;
|
// internal int slotIndex;
|
||||||
// internal float[] frames;
|
// internal float[] frames;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class DrawOrderTimeline : public Timeline
|
class DrawOrderTimeline : public Timeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// internal float[] frames;
|
// internal float[] frames;
|
||||||
// private int[][] drawOrders;
|
// private int[][] drawOrders;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class EventTimeline : public Timeline
|
class EventTimeline : public Timeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// internal float[] frames;
|
// internal float[] frames;
|
||||||
// private Event[] events;
|
// private Event[] events;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified
|
/// Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class IkConstraintTimeline : public CurveTimeline
|
class IkConstraintTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 3;
|
// public const int ENTRIES = 3;
|
||||||
// private const int PREV_TIME = -3, PREV_MIX = -2, PREV_BEND_DIRECTION = -1;
|
// private const int PREV_TIME = -3, PREV_MIX = -2, PREV_BEND_DIRECTION = -1;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace Spine
|
|||||||
/// Attachment that displays a texture region using a mesh.
|
/// Attachment that displays a texture region using a mesh.
|
||||||
class MeshAttachment : public VertexAttachment
|
class MeshAttachment : public VertexAttachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MeshAttachment(std::string name);
|
MeshAttachment(std::string name);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class PathAttachment : public VertexAttachment
|
class PathAttachment : public VertexAttachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PathAttachment(std::string name);
|
PathAttachment(std::string name);
|
||||||
|
|||||||
@ -47,7 +47,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PathConstraint(PathConstraintData& data, Skeleton& skeleton);
|
PathConstraint(PathConstraintData& data, Skeleton& skeleton);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class PathConstraintMixTimeline : public CurveTimeline
|
class PathConstraintMixTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 3;
|
// public const int ENTRIES = 3;
|
||||||
// private const int PREV_TIME = -3, PREV_ROTATE = -2, PREV_TRANSLATE = -1;
|
// private const int PREV_TIME = -3, PREV_ROTATE = -2, PREV_TRANSLATE = -1;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class PathConstraintPositionTimeline : public CurveTimeline
|
class PathConstraintPositionTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 2;
|
// public const int ENTRIES = 2;
|
||||||
// protected const int PREV_TIME = -2, PREV_VALUE = -1;
|
// protected const int PREV_TIME = -2, PREV_VALUE = -1;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline
|
class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// override public int PropertyId {
|
// override public int PropertyId {
|
||||||
// get { return ((int)TimelineType.PathConstraintSpacing << 24) + pathConstraintIndex; }
|
// get { return ((int)TimelineType.PathConstraintSpacing << 24) + pathConstraintIndex; }
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace Spine
|
|||||||
///
|
///
|
||||||
class PointAttachment : public Attachment
|
class PointAttachment : public Attachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PointAttachment(std::string name);
|
PointAttachment(std::string name);
|
||||||
|
|||||||
@ -46,7 +46,7 @@ namespace Spine
|
|||||||
/// Attachment that displays a texture region.
|
/// Attachment that displays a texture region.
|
||||||
class RegionAttachment : public Attachment
|
class RegionAttachment : public Attachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RegionAttachment(std::string name);
|
RegionAttachment(std::string name);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class RotateTimeline : public CurveTimeline
|
class RotateTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const int ENTRIES = 2;
|
static const int ENTRIES = 2;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class ScaleTimeline : public TranslateTimeline
|
class ScaleTimeline : public TranslateTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// override public int PropertyId {
|
// override public int PropertyId {
|
||||||
// get { return ((int)TimelineType.Scale << 24) + boneIndex; }
|
// get { return ((int)TimelineType.Scale << 24) + boneIndex; }
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class ShearTimeline : public TranslateTimeline
|
class ShearTimeline : public TranslateTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// override public int PropertyId {
|
// override public int PropertyId {
|
||||||
// get { return ((int)TimelineType.Shear << 24) + boneIndex; }
|
// get { return ((int)TimelineType.Shear << 24) + boneIndex; }
|
||||||
|
|||||||
@ -28,48 +28,48 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#ifndef Spine_RTTI_h
|
#ifndef Spine_SPINE_RTTI_h
|
||||||
#define Spine_RTTI_h
|
#define Spine_SPINE_RTTI_h
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
class RTTI
|
class SPINE_RTTI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RTTI(const std::string& className);
|
SPINE_RTTI(const std::string& className);
|
||||||
|
|
||||||
RTTI(const std::string& className, const RTTI& baseRTTI);
|
SPINE_RTTI(const std::string& className, const SPINE_RTTI& baseSPINE_RTTI);
|
||||||
|
|
||||||
const std::string& getClassName() const;
|
const std::string& getClassName() const;
|
||||||
|
|
||||||
bool isExactly(const RTTI& rtti) const;
|
bool isExactly(const SPINE_RTTI& rtti) const;
|
||||||
|
|
||||||
bool derivesFrom(const RTTI& rtti) const;
|
bool derivesFrom(const SPINE_RTTI& rtti) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Prevent copying
|
// Prevent copying
|
||||||
RTTI(const RTTI& obj);
|
SPINE_RTTI(const SPINE_RTTI& obj);
|
||||||
RTTI& operator=(const RTTI& obj);
|
SPINE_RTTI& operator=(const SPINE_RTTI& obj);
|
||||||
|
|
||||||
const std::string m_className;
|
const std::string m_className;
|
||||||
const RTTI *m_pBaseRTTI;
|
const SPINE_RTTI *m_pBaseSPINE_RTTI;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RTTI_DECL \
|
#define SPINE_RTTI_DECL \
|
||||||
public: \
|
public: \
|
||||||
static const Spine::RTTI rtti; \
|
static const Spine::SPINE_RTTI rtti; \
|
||||||
virtual const Spine::RTTI& getRTTI();
|
virtual const Spine::SPINE_RTTI& getSPINE_RTTI();
|
||||||
|
|
||||||
#define RTTI_IMPL_NOPARENT(name) \
|
#define SPINE_RTTI_IMPL_NOPARENT(name) \
|
||||||
const Spine::RTTI name::rtti(#name); \
|
const Spine::SPINE_RTTI name::rtti(#name); \
|
||||||
const Spine::RTTI& name::getRTTI() { return rtti; }
|
const Spine::SPINE_RTTI& name::getSPINE_RTTI() { return rtti; }
|
||||||
|
|
||||||
#define RTTI_IMPL(name,parent) \
|
#define SPINE_RTTI_IMPL(name,parent) \
|
||||||
const Spine::RTTI name::rtti(#name, parent::rtti); \
|
const Spine::SPINE_RTTI name::rtti(#name, parent::rtti); \
|
||||||
const Spine::RTTI& name::getRTTI() { return rtti; }
|
const Spine::SPINE_RTTI& name::getSPINE_RTTI() { return rtti; }
|
||||||
|
|
||||||
#endif /* Spine_RTTI_h */
|
#endif /* Spine_SPINE_RTTI_h */
|
||||||
|
|
||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_Timeline_h
|
#ifndef Spine_Timeline_h
|
||||||
#define Spine_Timeline_h
|
#define Spine_Timeline_h
|
||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/SpineRTTI.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/MixPose.h>
|
#include <spine/MixPose.h>
|
||||||
#include <spine/MixDirection.h>
|
#include <spine/MixDirection.h>
|
||||||
@ -43,7 +43,7 @@ namespace Spine
|
|||||||
|
|
||||||
class Timeline
|
class Timeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Timeline();
|
Timeline();
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TransformConstraint(TransformConstraintData& data, Skeleton& skeleton);
|
TransformConstraint(TransformConstraintData& data, Skeleton& skeleton);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class TransformConstraintTimeline : public CurveTimeline
|
class TransformConstraintTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 5;
|
// public const int ENTRIES = 5;
|
||||||
// private const int PREV_TIME = -5, PREV_ROTATE = -4, PREV_TRANSLATE = -3, PREV_SCALE = -2, PREV_SHEAR = -1;
|
// private const int PREV_TIME = -5, PREV_ROTATE = -4, PREV_TRANSLATE = -3, PREV_SCALE = -2, PREV_SHEAR = -1;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class TranslateTimeline : public CurveTimeline
|
class TranslateTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 3;
|
// public const int ENTRIES = 3;
|
||||||
// protected const int PREV_TIME = -3, PREV_X = -2, PREV_Y = -1;
|
// protected const int PREV_TIME = -3, PREV_X = -2, PREV_Y = -1;
|
||||||
|
|||||||
@ -37,7 +37,7 @@ namespace Spine
|
|||||||
{
|
{
|
||||||
class TwoColorTimeline : public CurveTimeline
|
class TwoColorTimeline : public CurveTimeline
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
// public const int ENTRIES = 8;
|
// public const int ENTRIES = 8;
|
||||||
// protected const int PREV_TIME = -8, PREV_R = -7, PREV_G = -6, PREV_B = -5, PREV_A = -4;
|
// protected const int PREV_TIME = -8, PREV_R = -7, PREV_G = -6, PREV_B = -5, PREV_A = -4;
|
||||||
|
|||||||
@ -31,13 +31,13 @@
|
|||||||
#ifndef Spine_Updatable_h
|
#ifndef Spine_Updatable_h
|
||||||
#define Spine_Updatable_h
|
#define Spine_Updatable_h
|
||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/SpineRTTI.h>
|
||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
class Updatable
|
class Updatable
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Updatable();
|
Updatable();
|
||||||
|
|||||||
@ -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.
|
/// 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
|
class VertexAttachment : public Attachment
|
||||||
{
|
{
|
||||||
RTTI_DECL;
|
SPINE_RTTI_DECL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VertexAttachment(std::string name);
|
VertexAttachment(std::string name);
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader);
|
SPINE_RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL_NOPARENT(Attachment);
|
SPINE_RTTI_IMPL_NOPARENT(Attachment);
|
||||||
|
|
||||||
Attachment::Attachment(std::string name) : _name(name)
|
Attachment::Attachment(std::string name) : _name(name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL_NOPARENT(AttachmentLoader);
|
SPINE_RTTI_IMPL_NOPARENT(AttachmentLoader);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,5 +38,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(AttachmentTimeline, Timeline);
|
SPINE_RTTI_IMPL(AttachmentTimeline, Timeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(Bone, Updatable);
|
SPINE_RTTI_IMPL(Bone, Updatable);
|
||||||
|
|
||||||
bool Bone::yDown = false;
|
bool Bone::yDown = false;
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(BoundingBoxAttachment, VertexAttachment);
|
SPINE_RTTI_IMPL(BoundingBoxAttachment, VertexAttachment);
|
||||||
|
|
||||||
BoundingBoxAttachment::BoundingBoxAttachment(std::string name) : VertexAttachment(name)
|
BoundingBoxAttachment::BoundingBoxAttachment(std::string name) : VertexAttachment(name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(ClippingAttachment, VertexAttachment);
|
SPINE_RTTI_IMPL(ClippingAttachment, VertexAttachment);
|
||||||
|
|
||||||
ClippingAttachment::ClippingAttachment(std::string name) : VertexAttachment(name)
|
ClippingAttachment::ClippingAttachment(std::string name) : VertexAttachment(name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(ColorTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(ColorTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(Constraint, Updatable);
|
SPINE_RTTI_IMPL(Constraint, Updatable);
|
||||||
|
|
||||||
Constraint::Constraint()
|
Constraint::Constraint()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(CurveTimeline, Timeline);
|
SPINE_RTTI_IMPL(CurveTimeline, Timeline);
|
||||||
|
|
||||||
const float CurveTimeline::LINEAR = 0;
|
const float CurveTimeline::LINEAR = 0;
|
||||||
const float CurveTimeline::STEPPED = 1;
|
const float CurveTimeline::STEPPED = 1;
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(DeformTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(DeformTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(DrawOrderTimeline, Timeline);
|
SPINE_RTTI_IMPL(DrawOrderTimeline, Timeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(EventTimeline, Timeline);
|
SPINE_RTTI_IMPL(EventTimeline, Timeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(IkConstraint, Constraint);
|
SPINE_RTTI_IMPL(IkConstraint, Constraint);
|
||||||
|
|
||||||
void IkConstraint::apply(Bone& bone, float targetX, float targetY, float alpha)
|
void IkConstraint::apply(Bone& bone, float targetX, float targetY, float alpha)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(IkConstraintTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(IkConstraintTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(MeshAttachment, VertexAttachment);
|
SPINE_RTTI_IMPL(MeshAttachment, VertexAttachment);
|
||||||
|
|
||||||
MeshAttachment::MeshAttachment(std::string name) : VertexAttachment(name),
|
MeshAttachment::MeshAttachment(std::string name) : VertexAttachment(name),
|
||||||
_regionOffsetX(0),
|
_regionOffsetX(0),
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PathAttachment, VertexAttachment);
|
SPINE_RTTI_IMPL(PathAttachment, VertexAttachment);
|
||||||
|
|
||||||
PathAttachment::PathAttachment(std::string name) : VertexAttachment(name)
|
PathAttachment::PathAttachment(std::string name) : VertexAttachment(name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,7 +45,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PathConstraint, Constraint);
|
SPINE_RTTI_IMPL(PathConstraint, Constraint);
|
||||||
|
|
||||||
const float PathConstraint::EPSILON = 0.00001f;
|
const float PathConstraint::EPSILON = 0.00001f;
|
||||||
const int PathConstraint::NONE = -1;
|
const int PathConstraint::NONE = -1;
|
||||||
@ -79,7 +79,7 @@ namespace Spine
|
|||||||
void PathConstraint::update()
|
void PathConstraint::update()
|
||||||
{
|
{
|
||||||
Attachment* baseAttachment = _target->getAttachment();
|
Attachment* baseAttachment = _target->getAttachment();
|
||||||
if (baseAttachment == NULL || !baseAttachment->getRTTI().derivesFrom(PathAttachment::rtti))
|
if (baseAttachment == NULL || !baseAttachment->getSPINE_RTTI().derivesFrom(PathAttachment::rtti))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PathConstraintMixTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(PathConstraintMixTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PathConstraintPositionTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(PathConstraintPositionTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline);
|
SPINE_RTTI_IMPL(PathConstraintSpacingTimeline, PathConstraintPositionTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(PointAttachment, Attachment);
|
SPINE_RTTI_IMPL(PointAttachment, Attachment);
|
||||||
|
|
||||||
PointAttachment::PointAttachment(std::string name) : Attachment(name)
|
PointAttachment::PointAttachment(std::string name) : Attachment(name)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(RegionAttachment, Attachment);
|
SPINE_RTTI_IMPL(RegionAttachment, Attachment);
|
||||||
|
|
||||||
const int RegionAttachment::BLX = 0;
|
const int RegionAttachment::BLX = 0;
|
||||||
const int RegionAttachment::BLY = 1;
|
const int RegionAttachment::BLY = 1;
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(RotateTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(RotateTimeline, CurveTimeline);
|
||||||
|
|
||||||
RotateTimeline::RotateTimeline(int frameCount) : CurveTimeline(frameCount), _boneIndex(0)
|
RotateTimeline::RotateTimeline(int frameCount) : CurveTimeline(frameCount), _boneIndex(0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(ScaleTimeline, TranslateTimeline);
|
SPINE_RTTI_IMPL(ScaleTimeline, TranslateTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(ShearTimeline, TranslateTimeline);
|
SPINE_RTTI_IMPL(ShearTimeline, TranslateTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -471,7 +471,7 @@ namespace Spine
|
|||||||
int verticesLength = 0;
|
int verticesLength = 0;
|
||||||
Attachment* attachment = slot->getAttachment();
|
Attachment* attachment = slot->getAttachment();
|
||||||
|
|
||||||
if (attachment != NULL && attachment->getRTTI().derivesFrom(RegionAttachment::rtti))
|
if (attachment != NULL && attachment->getSPINE_RTTI().derivesFrom(RegionAttachment::rtti))
|
||||||
{
|
{
|
||||||
RegionAttachment* regionAttachment = static_cast<RegionAttachment*>(attachment);
|
RegionAttachment* regionAttachment = static_cast<RegionAttachment*>(attachment);
|
||||||
|
|
||||||
@ -482,7 +482,7 @@ namespace Spine
|
|||||||
}
|
}
|
||||||
regionAttachment->computeWorldVertices(slot->getBone(), outVertexBuffer, 0);
|
regionAttachment->computeWorldVertices(slot->getBone(), outVertexBuffer, 0);
|
||||||
}
|
}
|
||||||
else if (attachment != NULL && attachment->getRTTI().derivesFrom(MeshAttachment::rtti))
|
else if (attachment != NULL && attachment->getSPINE_RTTI().derivesFrom(MeshAttachment::rtti))
|
||||||
{
|
{
|
||||||
MeshAttachment* mesh = static_cast<MeshAttachment*>(attachment);
|
MeshAttachment* mesh = static_cast<MeshAttachment*>(attachment);
|
||||||
|
|
||||||
@ -699,7 +699,7 @@ namespace Spine
|
|||||||
}
|
}
|
||||||
|
|
||||||
Attachment* attachment = slot->_attachment;
|
Attachment* attachment = slot->_attachment;
|
||||||
if (attachment != NULL && attachment->getRTTI().derivesFrom(PathAttachment::rtti))
|
if (attachment != NULL && attachment->getSPINE_RTTI().derivesFrom(PathAttachment::rtti))
|
||||||
{
|
{
|
||||||
sortPathConstraintAttachment(attachment, slotBone);
|
sortPathConstraintAttachment(attachment, slotBone);
|
||||||
}
|
}
|
||||||
@ -780,7 +780,7 @@ namespace Spine
|
|||||||
|
|
||||||
void Skeleton::sortPathConstraintAttachment(Attachment* attachment, Bone& slotBone)
|
void Skeleton::sortPathConstraintAttachment(Attachment* attachment, Bone& slotBone)
|
||||||
{
|
{
|
||||||
if (attachment == NULL || attachment->getRTTI().derivesFrom(PathAttachment::rtti))
|
if (attachment == NULL || attachment->getSPINE_RTTI().derivesFrom(PathAttachment::rtti))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,33 +28,33 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/SpineRTTI.h>
|
||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI::RTTI(const std::string& className) : m_className(className), m_pBaseRTTI(NULL)
|
SPINE_RTTI::SPINE_RTTI(const std::string& className) : m_className(className), m_pBaseSPINE_RTTI(NULL)
|
||||||
{
|
{
|
||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
RTTI::RTTI(const std::string& className, const RTTI& baseRTTI) : m_className(className), m_pBaseRTTI(&baseRTTI)
|
SPINE_RTTI::SPINE_RTTI(const std::string& className, const SPINE_RTTI& baseSPINE_RTTI) : m_className(className), m_pBaseSPINE_RTTI(&baseSPINE_RTTI)
|
||||||
{
|
{
|
||||||
// Empty
|
// Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& RTTI::getClassName() const
|
const std::string& SPINE_RTTI::getClassName() const
|
||||||
{
|
{
|
||||||
return m_className;
|
return m_className;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTTI::isExactly(const RTTI& rtti) const
|
bool SPINE_RTTI::isExactly(const SPINE_RTTI& rtti) const
|
||||||
{
|
{
|
||||||
return (this == &rtti);
|
return (this == &rtti);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTTI::derivesFrom(const RTTI& rtti) const
|
bool SPINE_RTTI::derivesFrom(const SPINE_RTTI& rtti) const
|
||||||
{
|
{
|
||||||
const RTTI * pCompare = this;
|
const SPINE_RTTI * pCompare = this;
|
||||||
|
|
||||||
while (pCompare)
|
while (pCompare)
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ namespace Spine
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pCompare = pCompare->m_pBaseRTTI;
|
pCompare = pCompare->m_pBaseSPINE_RTTI;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL_NOPARENT(Timeline);
|
SPINE_RTTI_IMPL_NOPARENT(Timeline);
|
||||||
|
|
||||||
Timeline::Timeline()
|
Timeline::Timeline()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(TransformConstraint, Constraint);
|
SPINE_RTTI_IMPL(TransformConstraint, Constraint);
|
||||||
|
|
||||||
TransformConstraint::TransformConstraint(TransformConstraintData& data, Skeleton& skeleton) : Constraint(),
|
TransformConstraint::TransformConstraint(TransformConstraintData& data, Skeleton& skeleton) : Constraint(),
|
||||||
_data(data),
|
_data(data),
|
||||||
|
|||||||
@ -32,6 +32,6 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(TransformConstraintTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(TransformConstraintTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(TranslateTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(TranslateTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,5 +32,5 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(TwoColorTimeline, CurveTimeline);
|
SPINE_RTTI_IMPL(TwoColorTimeline, CurveTimeline);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL_NOPARENT(Updatable);
|
SPINE_RTTI_IMPL_NOPARENT(Updatable);
|
||||||
|
|
||||||
Updatable::Updatable()
|
Updatable::Updatable()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
namespace Spine
|
namespace Spine
|
||||||
{
|
{
|
||||||
RTTI_IMPL(VertexAttachment, Attachment);
|
SPINE_RTTI_IMPL(VertexAttachment, Attachment);
|
||||||
|
|
||||||
VertexAttachment::VertexAttachment(std::string name) : Attachment(name), _worldVerticesLength(0), _id(getNextID())
|
VertexAttachment::VertexAttachment(std::string name) : Attachment(name), _worldVerticesLength(0), _id(getNextID())
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user