mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[cpp][ue4] All classes now optionally export through SP_API. Also fixed code to escape MSVC++ compiler bug, where multiple static const exported class fields on the same line will trigger a compile error.
This commit is contained in:
parent
8de7a66920
commit
bb48f1466b
@ -44,7 +44,7 @@ class Skeleton;
|
|||||||
|
|
||||||
class Event;
|
class Event;
|
||||||
|
|
||||||
class Animation : public SpineObject {
|
class SP_API Animation : public SpineObject {
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
friend class TrackEntry;
|
friend class TrackEntry;
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace spine {
|
|||||||
typedef void (*AnimationStateListener) (AnimationState* state, EventType type, TrackEntry* entry, Event* event);
|
typedef void (*AnimationStateListener) (AnimationState* state, EventType type, TrackEntry* entry, Event* event);
|
||||||
|
|
||||||
/// State for the playback of an animation
|
/// State for the playback of an animation
|
||||||
class TrackEntry : public SpineObject, public HasRendererObject {
|
class SP_API TrackEntry : public SpineObject, public HasRendererObject {
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ namespace spine {
|
|||||||
void reset();
|
void reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
class EventQueueEntry : public SpineObject {
|
class SP_API EventQueueEntry : public SpineObject {
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -274,7 +274,7 @@ namespace spine {
|
|||||||
EventQueueEntry(EventType eventType, TrackEntry* trackEntry, Event* event = NULL);
|
EventQueueEntry(EventType eventType, TrackEntry* trackEntry, Event* event = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
class EventQueue : public SpineObject {
|
class SP_API EventQueue : public SpineObject {
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -307,7 +307,7 @@ namespace spine {
|
|||||||
void drain();
|
void drain();
|
||||||
};
|
};
|
||||||
|
|
||||||
class AnimationState : public SpineObject, public HasRendererObject {
|
class SP_API AnimationState : public SpineObject, public HasRendererObject {
|
||||||
friend class TrackEntry;
|
friend class TrackEntry;
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
|
|
||||||
@ -401,7 +401,6 @@ namespace spine {
|
|||||||
void enableQueue();
|
void enableQueue();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int Subsequent, First, Hold, HoldMix;
|
|
||||||
|
|
||||||
AnimationStateData* _data;
|
AnimationStateData* _data;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace spine {
|
|||||||
class Animation;
|
class Animation;
|
||||||
|
|
||||||
/// Stores mix (crossfade) durations to be applied when AnimationState animations are changed.
|
/// Stores mix (crossfade) durations to be applied when AnimationState animations are changed.
|
||||||
class AnimationStateData : public SpineObject {
|
class SP_API AnimationStateData : public SpineObject {
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -65,7 +65,7 @@ enum TextureWrap {
|
|||||||
TextureWrap_Repeat
|
TextureWrap_Repeat
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtlasPage : public SpineObject, public HasRendererObject {
|
class SP_API AtlasPage : public SpineObject, public HasRendererObject {
|
||||||
public:
|
public:
|
||||||
String name;
|
String name;
|
||||||
Format format;
|
Format format;
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
virtual ~AtlasPage() { }
|
virtual ~AtlasPage() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtlasRegion : public SpineObject {
|
class SP_API AtlasRegion : public SpineObject {
|
||||||
public:
|
public:
|
||||||
AtlasPage *page;
|
AtlasPage *page;
|
||||||
String name;
|
String name;
|
||||||
@ -99,7 +99,7 @@ public:
|
|||||||
|
|
||||||
class TextureLoader;
|
class TextureLoader;
|
||||||
|
|
||||||
class Atlas : public SpineObject {
|
class SP_API Atlas : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Atlas(const String &path, TextureLoader *textureLoader);
|
Atlas(const String &path, TextureLoader *textureLoader);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace spine {
|
|||||||
/// An AttachmentLoader that configures attachments using texture regions from an Atlas.
|
/// An AttachmentLoader that configures attachments using texture regions from an Atlas.
|
||||||
/// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide.
|
/// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide.
|
||||||
///
|
///
|
||||||
class AtlasAttachmentLoader : public AttachmentLoader {
|
class SP_API AtlasAttachmentLoader : public AttachmentLoader {
|
||||||
public:
|
public:
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include <spine/SpineString.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Attachment : public SpineObject {
|
class SP_API Attachment : public SpineObject {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace spine {
|
|||||||
class PointAttachment;
|
class PointAttachment;
|
||||||
class ClippingAttachment;
|
class ClippingAttachment;
|
||||||
|
|
||||||
class AttachmentLoader : public SpineObject {
|
class SP_API AttachmentLoader : public SpineObject {
|
||||||
public:
|
public:
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
|
|||||||
@ -39,10 +39,11 @@
|
|||||||
#include <spine/SpineString.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
|
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
class Event;
|
class Event;
|
||||||
|
|
||||||
class AttachmentTimeline : public Timeline {
|
class SP_API AttachmentTimeline : public Timeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class Skeleton;
|
|||||||
/// A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
|
/// A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
|
||||||
/// local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
|
/// local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
|
||||||
/// 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 SP_API Bone : public Updatable {
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
friend class RotateTimeline;
|
friend class RotateTimeline;
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include <spine/SpineString.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class BoneData : public SpineObject {
|
class SP_API BoneData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
/// Attachment that has a polygon for bounds checking.
|
/// Attachment that has a polygon for bounds checking.
|
||||||
class BoundingBoxAttachment : public VertexAttachment {
|
class SP_API BoundingBoxAttachment : public VertexAttachment {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
explicit BoundingBoxAttachment(const String& name);
|
explicit BoundingBoxAttachment(const String& name);
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class SlotData;
|
class SlotData;
|
||||||
|
|
||||||
class ClippingAttachment : public VertexAttachment {
|
class SP_API ClippingAttachment : public VertexAttachment {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
#include <spine/MathUtil.h>
|
#include <spine/MathUtil.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Color : public SpineObject {
|
class SP_API Color : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Color() : r(0), g(0), b(0), a(0) {
|
Color() : r(0), g(0), b(0), a(0) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class ColorTimeline : public CurveTimeline {
|
class SP_API ColorTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
@ -62,8 +62,15 @@ public:
|
|||||||
Vector<float> &getFrames();
|
Vector<float> &getFrames();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static const int PREV_TIME, PREV_R, PREV_G, PREV_B, PREV_A;
|
static const int PREV_TIME;
|
||||||
static const int R, G, B, A;
|
static const int PREV_R;
|
||||||
|
static const int PREV_G;
|
||||||
|
static const int PREV_B;
|
||||||
|
static const int PREV_A;
|
||||||
|
static const int R;
|
||||||
|
static const int G;
|
||||||
|
static const int B;
|
||||||
|
static const int A;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int _slotIndex;
|
int _slotIndex;
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
/// The interface for all constraints.
|
/// The interface for all constraints.
|
||||||
class Constraint : public Updatable {
|
class SP_API Constraint : public Updatable {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class ContainerUtil : public SpineObject {
|
class SP_API ContainerUtil : public SpineObject {
|
||||||
public:
|
public:
|
||||||
/// Finds an item by comparing each item's name.
|
/// Finds an item by comparing each item's name.
|
||||||
/// It is more efficient to cache the results of this method than to call it multiple times.
|
/// It is more efficient to cache the results of this method than to call it multiple times.
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
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 SP_API CurveTimeline : public Timeline {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class DebugExtension : public SpineExtension {
|
class SP_API DebugExtension : public SpineExtension {
|
||||||
struct Allocation {
|
struct Allocation {
|
||||||
void *address;
|
void *address;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class VertexAttachment;
|
class VertexAttachment;
|
||||||
|
|
||||||
class DeformTimeline : public CurveTimeline {
|
class SP_API DeformTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/Timeline.h>
|
#include <spine/Timeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class DrawOrderTimeline : public Timeline {
|
class SP_API DrawOrderTimeline : public Timeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace spine {
|
|||||||
class EventData;
|
class EventData;
|
||||||
|
|
||||||
/// Stores the current pose values for an Event.
|
/// Stores the current pose values for an Event.
|
||||||
class Event : public SpineObject {
|
class SP_API Event : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
/// Stores the setup pose values for an Event.
|
/// Stores the setup pose values for an Event.
|
||||||
class EventData : public SpineObject {
|
class SP_API EventData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/Timeline.h>
|
#include <spine/Timeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class EventTimeline : public Timeline {
|
class SP_API EventTimeline : public Timeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,14 @@
|
|||||||
#define Spine_Extension_h
|
#define Spine_Extension_h
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <spine/dll.h>
|
||||||
|
|
||||||
#define SP_UNUSED(x) (void)(x)
|
#define SP_UNUSED(x) (void)(x)
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
class SpineExtension {
|
class SP_API SpineExtension {
|
||||||
public:
|
public:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static T *alloc(size_t num, const char *file, int line) {
|
static T *alloc(size_t num, const char *file, int line) {
|
||||||
@ -89,7 +90,7 @@ private:
|
|||||||
static SpineExtension *_instance;
|
static SpineExtension *_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DefaultSpineExtension : public SpineExtension {
|
class SP_API DefaultSpineExtension : public SpineExtension {
|
||||||
public:
|
public:
|
||||||
DefaultSpineExtension();
|
DefaultSpineExtension();
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ namespace spine {
|
|||||||
|
|
||||||
typedef void (*DisposeRendererObject) (void* rendererObject);
|
typedef void (*DisposeRendererObject) (void* rendererObject);
|
||||||
|
|
||||||
class HasRendererObject {
|
class SP_API HasRendererObject {
|
||||||
public:
|
public:
|
||||||
explicit HasRendererObject() : _rendererObject(NULL), _dispose(NULL) {};
|
explicit HasRendererObject() : _rendererObject(NULL), _dispose(NULL) {};
|
||||||
|
|
||||||
|
|||||||
@ -42,12 +42,12 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
template<typename K, typename V>
|
template<typename K, typename V>
|
||||||
class HashMap : public SpineObject {
|
class SP_API HashMap : public SpineObject {
|
||||||
private:
|
private:
|
||||||
class Entry;
|
class Entry;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class Pair {
|
class SP_API Pair {
|
||||||
public:
|
public:
|
||||||
explicit Pair(K &k, V &v) : key(k), value(v) {}
|
explicit Pair(K &k, V &v) : key(k), value(v) {}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ public:
|
|||||||
V &value;
|
V &value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Entries {
|
class SP_API Entries {
|
||||||
public:
|
public:
|
||||||
friend class HashMap;
|
friend class HashMap;
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ private:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
class Entry : public SpineObject {
|
class SP_API Entry : public SpineObject {
|
||||||
public:
|
public:
|
||||||
K _key;
|
K _key;
|
||||||
V _value;
|
V _value;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class Skeleton;
|
|||||||
|
|
||||||
class Bone;
|
class Bone;
|
||||||
|
|
||||||
class IkConstraint : public Constraint {
|
class SP_API IkConstraint : public Constraint {
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|
||||||
friend class IkConstraintTimeline;
|
friend class IkConstraintTimeline;
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class BoneData;
|
class BoneData;
|
||||||
|
|
||||||
class IkConstraintData : public SpineObject {
|
class SP_API IkConstraintData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
friend class IkConstraint;
|
friend class IkConstraint;
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class IkConstraintTimeline : public CurveTimeline {
|
|
||||||
|
class SP_API IkConstraintTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -53,8 +54,15 @@ namespace spine {
|
|||||||
void setFrame (int frameIndex, float time, float mix, int bendDirection, bool compress, bool stretch);
|
void setFrame (int frameIndex, float time, float mix, int bendDirection, bool compress, bool stretch);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int PREV_TIME, PREV_MIX, PREV_BEND_DIRECTION, PREV_COMPRESS, PREV_STRETCH;
|
static const int PREV_TIME;
|
||||||
static const int MIX, BEND_DIRECTION, COMPRESS, STRETCH;
|
static const int PREV_MIX;
|
||||||
|
static const int PREV_BEND_DIRECTION;
|
||||||
|
static const int PREV_COMPRESS;
|
||||||
|
static const int PREV_STRETCH;
|
||||||
|
static const int MIX;
|
||||||
|
static const int BEND_DIRECTION;
|
||||||
|
static const int COMPRESS;
|
||||||
|
static const int STRETCH;
|
||||||
|
|
||||||
Vector<float> _frames;
|
Vector<float> _frames;
|
||||||
int _ikConstraintIndex;
|
int _ikConstraintIndex;
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Json : public SpineObject {
|
class SP_API Json : public SpineObject {
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class MeshAttachment;
|
class MeshAttachment;
|
||||||
|
|
||||||
class LinkedMesh : public SpineObject {
|
class SP_API LinkedMesh : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
|
|
||||||
class MathUtil : public SpineObject {
|
class SP_API MathUtil : public SpineObject {
|
||||||
private:
|
private:
|
||||||
MathUtil();
|
MathUtil();
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ public:
|
|||||||
static float pow(float a, float b);
|
static float pow(float a, float b);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Interpolation {
|
struct SP_API Interpolation {
|
||||||
virtual float apply(float a) = 0;
|
virtual float apply(float a) = 0;
|
||||||
|
|
||||||
virtual float interpolate(float start, float end, float a) {
|
virtual float interpolate(float start, float end, float a) {
|
||||||
@ -102,7 +102,7 @@ struct Interpolation {
|
|||||||
virtual ~Interpolation() {};
|
virtual ~Interpolation() {};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PowInterpolation: public Interpolation {
|
struct SP_API PowInterpolation: public Interpolation {
|
||||||
PowInterpolation(int power): power(power) {
|
PowInterpolation(int power): power(power) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ struct PowInterpolation: public Interpolation {
|
|||||||
int power;
|
int power;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PowOutInterpolation: public Interpolation {
|
struct SP_API PowOutInterpolation: public Interpolation {
|
||||||
PowOutInterpolation(int power): power(power) {
|
PowOutInterpolation(int power): power(power) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
/// Attachment that displays a texture region using a mesh.
|
/// Attachment that displays a texture region using a mesh.
|
||||||
class MeshAttachment : public VertexAttachment, public HasRendererObject {
|
class SP_API MeshAttachment : public VertexAttachment, public HasRendererObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
friend class AtlasAttachmentLoader;
|
friend class AtlasAttachmentLoader;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/VertexAttachment.h>
|
#include <spine/VertexAttachment.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class PathAttachment : public VertexAttachment {
|
class SP_API PathAttachment : public VertexAttachment {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace spine {
|
|||||||
class Bone;
|
class Bone;
|
||||||
class Slot;
|
class Slot;
|
||||||
|
|
||||||
class PathConstraint : public Constraint {
|
class SP_API PathConstraint : public Constraint {
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
friend class PathConstraintMixTimeline;
|
friend class PathConstraintMixTimeline;
|
||||||
friend class PathConstraintPositionTimeline;
|
friend class PathConstraintPositionTimeline;
|
||||||
|
|||||||
@ -42,7 +42,7 @@ namespace spine {
|
|||||||
class BoneData;
|
class BoneData;
|
||||||
class SlotData;
|
class SlotData;
|
||||||
|
|
||||||
class PathConstraintData : public SpineObject {
|
class SP_API PathConstraintData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,9 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class PathConstraintMixTimeline : public CurveTimeline {
|
#define SP_PATHCONSTRAINTMIXTIMELINE_ENTRIES 5
|
||||||
|
|
||||||
|
class SP_API PathConstraintMixTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -50,8 +52,11 @@ namespace spine {
|
|||||||
virtual int getPropertyId();
|
virtual int getPropertyId();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int PREV_TIME, PREV_ROTATE, PREV_TRANSLATE;
|
static const int PREV_TIME;
|
||||||
static const int ROTATE, TRANSLATE;
|
static const int PREV_ROTATE;
|
||||||
|
static const int PREV_TRANSLATE;
|
||||||
|
static const int ROTATE;
|
||||||
|
static const int TRANSLATE;
|
||||||
|
|
||||||
Vector<float> _frames;
|
Vector<float> _frames;
|
||||||
int _pathConstraintIndex;
|
int _pathConstraintIndex;
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class PathConstraintPositionTimeline : public CurveTimeline {
|
|
||||||
|
class SP_API PathConstraintPositionTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -55,7 +56,8 @@ namespace spine {
|
|||||||
void setFrame(int frameIndex, float time, float value);
|
void setFrame(int frameIndex, float time, float value);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static const int PREV_TIME, PREV_VALUE;
|
static const int PREV_TIME;
|
||||||
|
static const int PREV_VALUE;
|
||||||
static const int VALUE;
|
static const int VALUE;
|
||||||
|
|
||||||
Vector<float> _frames;
|
Vector<float> _frames;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/PathConstraintPositionTimeline.h>
|
#include <spine/PathConstraintPositionTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
|
class SP_API PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ namespace spine {
|
|||||||
///
|
///
|
||||||
/// See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide.
|
/// See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide.
|
||||||
///
|
///
|
||||||
class PointAttachment : public Attachment {
|
class SP_API PointAttachment : public Attachment {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Pool : public SpineObject {
|
class SP_API Pool : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Pool() {
|
Pool() {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class RTTI : public SpineObject {
|
class SP_API RTTI : public SpineObject {
|
||||||
public:
|
public:
|
||||||
explicit RTTI(const std::string &className);
|
explicit RTTI(const std::string &className);
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace spine {
|
|||||||
class Bone;
|
class Bone;
|
||||||
|
|
||||||
/// Attachment that displays a texture region.
|
/// Attachment that displays a texture region.
|
||||||
class RegionAttachment : public Attachment, public HasRendererObject {
|
class SP_API RegionAttachment : public Attachment, public HasRendererObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
friend class AtlasAttachmentLoader;
|
friend class AtlasAttachmentLoader;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class RotateTimeline : public CurveTimeline {
|
class SP_API RotateTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/TranslateTimeline.h>
|
#include <spine/TranslateTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class ScaleTimeline : public TranslateTimeline {
|
class SP_API ScaleTimeline : public TranslateTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/TranslateTimeline.h>
|
#include <spine/TranslateTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class ShearTimeline : public TranslateTimeline {
|
class SP_API ShearTimeline : public TranslateTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ class Skin;
|
|||||||
|
|
||||||
class Attachment;
|
class Attachment;
|
||||||
|
|
||||||
class Skeleton : public SpineObject {
|
class SP_API Skeleton : public SpineObject {
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
friend class SkeletonBounds;
|
friend class SkeletonBounds;
|
||||||
|
|||||||
@ -48,7 +48,7 @@ namespace spine {
|
|||||||
class Animation;
|
class Animation;
|
||||||
class CurveTimeline;
|
class CurveTimeline;
|
||||||
|
|
||||||
class SkeletonBinary : public SpineObject {
|
class SP_API SkeletonBinary : public SpineObject {
|
||||||
public:
|
public:
|
||||||
static const int BONE_ROTATE;
|
static const int BONE_ROTATE;
|
||||||
static const int BONE_TRANSLATE;
|
static const int BONE_TRANSLATE;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ namespace spine {
|
|||||||
/// Collects each BoundingBoxAttachment that is visible and computes the world vertices for its polygon.
|
/// Collects each BoundingBoxAttachment that is visible and computes the world vertices for its polygon.
|
||||||
/// The polygon vertices are provided along with convenience methods for doing hit detection.
|
/// The polygon vertices are provided along with convenience methods for doing hit detection.
|
||||||
///
|
///
|
||||||
class SkeletonBounds : public SpineObject {
|
class SP_API SkeletonBounds : public SpineObject {
|
||||||
public:
|
public:
|
||||||
SkeletonBounds();
|
SkeletonBounds();
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace spine {
|
|||||||
class Slot;
|
class Slot;
|
||||||
class ClippingAttachment;
|
class ClippingAttachment;
|
||||||
|
|
||||||
class SkeletonClipping : public SpineObject {
|
class SP_API SkeletonClipping : public SpineObject {
|
||||||
public:
|
public:
|
||||||
SkeletonClipping();
|
SkeletonClipping();
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ class TransformConstraintData;
|
|||||||
class PathConstraintData;
|
class PathConstraintData;
|
||||||
|
|
||||||
/// Stores the setup pose and all of the stateless data for a skeleton.
|
/// Stores the setup pose and all of the stateless data for a skeleton.
|
||||||
class SkeletonData : public SpineObject {
|
class SP_API SkeletonData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -54,7 +54,7 @@ class LinkedMesh;
|
|||||||
|
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
class SkeletonJson : public SpineObject {
|
class SP_API SkeletonJson : public SpineObject {
|
||||||
public:
|
public:
|
||||||
explicit SkeletonJson(Atlas *atlas);
|
explicit SkeletonJson(Atlas *atlas);
|
||||||
|
|
||||||
|
|||||||
@ -42,15 +42,15 @@ class Skeleton;
|
|||||||
/// Stores attachments by slot index and attachment name.
|
/// Stores attachments by slot index and attachment name.
|
||||||
/// See SkeletonData::getDefaultSkin, Skeleton::getSkin, and
|
/// See SkeletonData::getDefaultSkin, Skeleton::getSkin, and
|
||||||
/// http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide.
|
/// http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide.
|
||||||
class Skin : public SpineObject {
|
class SP_API Skin : public SpineObject {
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class AttachmentMap : public SpineObject {
|
class SP_API AttachmentMap : public SpineObject {
|
||||||
friend class Skin;
|
friend class Skin;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct Entry {
|
struct SP_API Entry {
|
||||||
size_t _slotIndex;
|
size_t _slotIndex;
|
||||||
String _name;
|
String _name;
|
||||||
Attachment *_attachment;
|
Attachment *_attachment;
|
||||||
@ -62,7 +62,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Entries {
|
class SP_API Entries {
|
||||||
friend class AttachmentMap;
|
friend class AttachmentMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -46,7 +46,7 @@ class Skeleton;
|
|||||||
|
|
||||||
class Attachment;
|
class Attachment;
|
||||||
|
|
||||||
class Slot : public SpineObject {
|
class SP_API Slot : public SpineObject {
|
||||||
friend class VertexAttachment;
|
friend class VertexAttachment;
|
||||||
|
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class BoneData;
|
class BoneData;
|
||||||
|
|
||||||
class SlotData : public SpineObject {
|
class SP_API SlotData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
|
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|||||||
@ -43,7 +43,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class String : public SpineObject {
|
class SP_API String : public SpineObject {
|
||||||
public:
|
public:
|
||||||
String() : _length(0), _buffer(NULL) {
|
String() : _length(0), _buffer(NULL) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class AtlasPage;
|
class AtlasPage;
|
||||||
|
|
||||||
class TextureLoader : public SpineObject {
|
class SP_API TextureLoader : public SpineObject {
|
||||||
public:
|
public:
|
||||||
TextureLoader();
|
TextureLoader();
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class Skeleton;
|
|||||||
|
|
||||||
class Event;
|
class Event;
|
||||||
|
|
||||||
class Timeline : public SpineObject {
|
class SP_API Timeline : public SpineObject {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace spine {
|
|||||||
class Skeleton;
|
class Skeleton;
|
||||||
class Bone;
|
class Bone;
|
||||||
|
|
||||||
class TransformConstraint : public Constraint {
|
class SP_API TransformConstraint : public Constraint {
|
||||||
friend class Skeleton;
|
friend class Skeleton;
|
||||||
friend class TransformConstraintTimeline;
|
friend class TransformConstraintTimeline;
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@
|
|||||||
namespace spine {
|
namespace spine {
|
||||||
class BoneData;
|
class BoneData;
|
||||||
|
|
||||||
class TransformConstraintData : public SpineObject {
|
class SP_API TransformConstraintData : public SpineObject {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class TransformConstraintTimeline : public CurveTimeline {
|
|
||||||
|
class SP_API TransformConstraintTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -52,8 +53,15 @@ namespace spine {
|
|||||||
void setFrame(size_t frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
|
void setFrame(size_t frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int PREV_TIME, PREV_ROTATE, PREV_TRANSLATE, PREV_SCALE, PREV_SHEAR;
|
static const int PREV_TIME;
|
||||||
static const int ROTATE, TRANSLATE, SCALE, SHEAR;
|
static const int PREV_ROTATE;
|
||||||
|
static const int PREV_TRANSLATE;
|
||||||
|
static const int PREV_SCALE;
|
||||||
|
static const int PREV_SHEAR;
|
||||||
|
static const int ROTATE;
|
||||||
|
static const int TRANSLATE;
|
||||||
|
static const int SCALE;
|
||||||
|
static const int SHEAR;
|
||||||
|
|
||||||
Vector<float> _frames;
|
Vector<float> _frames;
|
||||||
int _transformConstraintIndex;
|
int _transformConstraintIndex;
|
||||||
|
|||||||
@ -37,7 +37,8 @@
|
|||||||
#include <spine/TimelineType.h>
|
#include <spine/TimelineType.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class TranslateTimeline : public CurveTimeline {
|
|
||||||
|
class SP_API TranslateTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -58,8 +59,11 @@ namespace spine {
|
|||||||
void setFrame(int frameIndex, float time, float x, float y);
|
void setFrame(int frameIndex, float time, float x, float y);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static const int PREV_TIME, PREV_X, PREV_Y;
|
static const int PREV_TIME;
|
||||||
static const int X, Y;
|
static const int PREV_X;
|
||||||
|
static const int PREV_Y;
|
||||||
|
static const int X;
|
||||||
|
static const int Y;
|
||||||
|
|
||||||
Vector<float> _frames;
|
Vector<float> _frames;
|
||||||
int _boneIndex;
|
int _boneIndex;
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
#include <spine/Pool.h>
|
#include <spine/Pool.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Triangulator : public SpineObject {
|
class SP_API Triangulator : public SpineObject {
|
||||||
public:
|
public:
|
||||||
~Triangulator();
|
~Triangulator();
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,8 @@
|
|||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class TwoColorTimeline : public CurveTimeline {
|
|
||||||
|
class SP_API TwoColorTimeline : public CurveTimeline {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
@ -56,9 +57,21 @@ namespace spine {
|
|||||||
void setSlotIndex(int inValue);
|
void setSlotIndex(int inValue);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int PREV_TIME, PREV_R, PREV_G, PREV_B, PREV_A;
|
static const int PREV_TIME;
|
||||||
static const int PREV_R2, PREV_G2, PREV_B2;
|
static const int PREV_R;
|
||||||
static const int R, G, B, A, R2, G2, B2;
|
static const int PREV_G;
|
||||||
|
static const int PREV_B;
|
||||||
|
static const int PREV_A;
|
||||||
|
static const int PREV_R2;
|
||||||
|
static const int PREV_G2;
|
||||||
|
static const int PREV_B2;
|
||||||
|
static const int R;
|
||||||
|
static const int G;
|
||||||
|
static const int B;
|
||||||
|
static const int A;
|
||||||
|
static const int R2;
|
||||||
|
static const int G2;
|
||||||
|
static const int B2;
|
||||||
|
|
||||||
Vector<float> _frames; // time, r, g, b, a, r2, g2, b2, ...
|
Vector<float> _frames; // time, r, g, b, a, r2, g2, b2, ...
|
||||||
int _slotIndex;
|
int _slotIndex;
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Updatable : public SpineObject {
|
class SP_API Updatable : public SpineObject {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Vector : public SpineObject {
|
class SP_API Vector : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Vector() : _size(0), _capacity(0), _buffer(NULL) {
|
Vector() : _size(0), _capacity(0), _buffer(NULL) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,7 +39,7 @@ namespace spine {
|
|||||||
class Slot;
|
class Slot;
|
||||||
|
|
||||||
/// 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 SP_API VertexAttachment : public Attachment {
|
||||||
friend class SkeletonBinary;
|
friend class SkeletonBinary;
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
friend class DeformTimeline;
|
friend class DeformTimeline;
|
||||||
|
|||||||
@ -39,14 +39,14 @@ namespace spine {
|
|||||||
class Skeleton;
|
class Skeleton;
|
||||||
class Color;
|
class Color;
|
||||||
|
|
||||||
class VertexEffect: public SpineObject {
|
class SP_API VertexEffect: public SpineObject {
|
||||||
public:
|
public:
|
||||||
virtual void begin(Skeleton& skeleton) = 0;
|
virtual void begin(Skeleton& skeleton) = 0;
|
||||||
virtual void transform(float& x, float& y, float &u, float &v, Color &light, Color &dark) = 0;
|
virtual void transform(float& x, float& y, float &u, float &v, Color &light, Color &dark) = 0;
|
||||||
virtual void end() = 0;
|
virtual void end() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JitterVertexEffect: public VertexEffect {
|
class SP_API JitterVertexEffect: public VertexEffect {
|
||||||
public:
|
public:
|
||||||
JitterVertexEffect(float jitterX, float jitterY);
|
JitterVertexEffect(float jitterX, float jitterY);
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ protected:
|
|||||||
float _jitterY;
|
float _jitterY;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SwirlVertexEffect: public VertexEffect {
|
class SP_API SwirlVertexEffect: public VertexEffect {
|
||||||
public:
|
public:
|
||||||
SwirlVertexEffect(float radius, Interpolation &interpolation);
|
SwirlVertexEffect(float radius, Interpolation &interpolation);
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace spine {
|
namespace spine {
|
||||||
class Vertices : public SpineObject {
|
class SP_API Vertices : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Vector<size_t> _bones;
|
Vector<size_t> _bones;
|
||||||
Vector<float> _vertices;
|
Vector<float> _vertices;
|
||||||
|
|||||||
52
spine-cpp/spine-cpp/include/spine/dll.h
Normal file
52
spine-cpp/spine-cpp/include/spine/dll.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* Spine Runtimes Software License v2.5
|
||||||
|
*
|
||||||
|
* Copyright (c) 2013-2016, Esoteric Software
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* You are granted a perpetual, non-exclusive, non-sublicensable, and
|
||||||
|
* non-transferable license to use, install, execute, and perform the Spine
|
||||||
|
* Runtimes software and derivative works solely for personal or internal
|
||||||
|
* use. Without the written permission of Esoteric Software (see Section 2 of
|
||||||
|
* the Spine Software License Agreement), you may not (a) modify, translate,
|
||||||
|
* adapt, or develop new applications using the Spine Runtimes or otherwise
|
||||||
|
* create derivative works or improvements of the Spine Runtimes or (b) remove,
|
||||||
|
* delete, alter, or obscure any trademarks or any copyright, trademark, patent,
|
||||||
|
* or other intellectual property or proprietary rights notices on or in the
|
||||||
|
* Software, including any copy thereof. Redistributions in binary or source
|
||||||
|
* form must include this license and terms.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
|
||||||
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||||
|
* EVENT SHALL ESOTERIC SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS INTERRUPTION, OR LOSS OF
|
||||||
|
* USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
||||||
|
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef SPINE_SHAREDLIB_H
|
||||||
|
#define SPINE_SHAREDLIB_H
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define DLLIMPORT __declspec(dllimport)
|
||||||
|
#define DLLEXPORT __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#ifndef DLLIMPORT
|
||||||
|
#define DLLIMPORT
|
||||||
|
#endif
|
||||||
|
#ifndef DLLEXPORT
|
||||||
|
#define DLLEXPORT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef SPINEPLUGIN_API
|
||||||
|
#define SP_API SPINEPLUGIN_API
|
||||||
|
#else
|
||||||
|
#define SP_API
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* SPINE_SHAREDLIB_H */
|
||||||
@ -269,10 +269,10 @@ void EventQueue::drain() {
|
|||||||
_drainDisabled = false;
|
_drainDisabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int AnimationState::Subsequent = 0;
|
const int Subsequent = 0;
|
||||||
const int AnimationState::First = 1;
|
const int First = 1;
|
||||||
const int AnimationState::Hold = 2;
|
const int Hold = 2;
|
||||||
const int AnimationState::HoldMix = 3;
|
const int HoldMix = 3;
|
||||||
|
|
||||||
AnimationState::AnimationState(AnimationStateData *data) :
|
AnimationState::AnimationState(AnimationStateData *data) :
|
||||||
_data(data),
|
_data(data),
|
||||||
@ -416,7 +416,7 @@ bool AnimationState::apply(Skeleton &skeleton) {
|
|||||||
Timeline *timeline = timelines[ii];
|
Timeline *timeline = timelines[ii];
|
||||||
assert(timeline);
|
assert(timeline);
|
||||||
|
|
||||||
MixBlend timelineBlend = timelineMode[ii] == AnimationState::Subsequent ? blend : MixBlend_Setup;
|
MixBlend timelineBlend = timelineMode[ii] == Subsequent ? blend : MixBlend_Setup;
|
||||||
|
|
||||||
RotateTimeline *rotateTimeline = NULL;
|
RotateTimeline *rotateTimeline = NULL;
|
||||||
if (timeline->getRTTI().isExactly(RotateTimeline::rtti)) {
|
if (timeline->getRTTI().isExactly(RotateTimeline::rtti)) {
|
||||||
@ -780,17 +780,17 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle
|
|||||||
MixBlend timelineBlend;
|
MixBlend timelineBlend;
|
||||||
float alpha;
|
float alpha;
|
||||||
switch (timelineMode[i]) {
|
switch (timelineMode[i]) {
|
||||||
case AnimationState::Subsequent:
|
case Subsequent:
|
||||||
if (!attachments && (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))) continue;
|
if (!attachments && (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))) continue;
|
||||||
if (!drawOrder && (timeline->getRTTI().isExactly(DrawOrderTimeline::rtti))) continue;
|
if (!drawOrder && (timeline->getRTTI().isExactly(DrawOrderTimeline::rtti))) continue;
|
||||||
timelineBlend = blend;
|
timelineBlend = blend;
|
||||||
alpha = alphaMix;
|
alpha = alphaMix;
|
||||||
break;
|
break;
|
||||||
case AnimationState::First:
|
case First:
|
||||||
timelineBlend = MixBlend_Setup;
|
timelineBlend = MixBlend_Setup;
|
||||||
alpha = alphaMix;
|
alpha = alphaMix;
|
||||||
break;
|
break;
|
||||||
case AnimationState::Hold:
|
case Hold:
|
||||||
timelineBlend = MixBlend_Setup;
|
timelineBlend = MixBlend_Setup;
|
||||||
alpha = alphaHold;
|
alpha = alphaHold;
|
||||||
break;
|
break;
|
||||||
@ -969,7 +969,7 @@ void AnimationState::setTimelineModes(TrackEntry *entry) {
|
|||||||
for (size_t i = 0; i < timelinesCount; i++) {
|
for (size_t i = 0; i < timelinesCount; i++) {
|
||||||
int id = timelines[i]->getPropertyId();
|
int id = timelines[i]->getPropertyId();
|
||||||
if (!_propertyIDs.contains(id)) _propertyIDs.add(id);
|
if (!_propertyIDs.contains(id)) _propertyIDs.add(id);
|
||||||
timelineMode[i] = AnimationState::Hold;
|
timelineMode[i] = Hold;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -980,24 +980,24 @@ void AnimationState::setTimelineModes(TrackEntry *entry) {
|
|||||||
for (; i < timelinesCount; ++i) {
|
for (; i < timelinesCount; ++i) {
|
||||||
int id = timelines[i]->getPropertyId();
|
int id = timelines[i]->getPropertyId();
|
||||||
if (_propertyIDs.contains(id)) {
|
if (_propertyIDs.contains(id)) {
|
||||||
timelineMode[i] = AnimationState::Subsequent;
|
timelineMode[i] = Subsequent;
|
||||||
} else {
|
} else {
|
||||||
_propertyIDs.add(id);
|
_propertyIDs.add(id);
|
||||||
|
|
||||||
if (to == NULL || !hasTimeline(to, id)) {
|
if (to == NULL || !hasTimeline(to, id)) {
|
||||||
timelineMode[i] = AnimationState::First;
|
timelineMode[i] = First;
|
||||||
} else {
|
} else {
|
||||||
for (TrackEntry *next = to->_mixingTo; next != NULL; next = next->_mixingTo) {
|
for (TrackEntry *next = to->_mixingTo; next != NULL; next = next->_mixingTo) {
|
||||||
if (hasTimeline(next, id)) continue;
|
if (hasTimeline(next, id)) continue;
|
||||||
if (entry->_mixDuration > 0) {
|
if (entry->_mixDuration > 0) {
|
||||||
timelineMode[i] = AnimationState::HoldMix;
|
timelineMode[i] = HoldMix;
|
||||||
timelineHoldMix[i] = entry;
|
timelineHoldMix[i] = entry;
|
||||||
i++;
|
i++;
|
||||||
goto continue_outer; // continue outer;
|
goto continue_outer; // continue outer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
timelineMode[i] = AnimationState::Hold;
|
timelineMode[i] = Hold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user