mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +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 Animation : public SpineObject {
|
||||
class SP_API Animation : public SpineObject {
|
||||
friend class AnimationState;
|
||||
|
||||
friend class TrackEntry;
|
||||
|
||||
@ -60,7 +60,7 @@ namespace spine {
|
||||
typedef void (*AnimationStateListener) (AnimationState* state, EventType type, TrackEntry* entry, Event* event);
|
||||
|
||||
/// 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 AnimationState;
|
||||
|
||||
@ -263,7 +263,7 @@ namespace spine {
|
||||
void reset();
|
||||
};
|
||||
|
||||
class EventQueueEntry : public SpineObject {
|
||||
class SP_API EventQueueEntry : public SpineObject {
|
||||
friend class EventQueue;
|
||||
|
||||
public:
|
||||
@ -274,7 +274,7 @@ namespace spine {
|
||||
EventQueueEntry(EventType eventType, TrackEntry* trackEntry, Event* event = NULL);
|
||||
};
|
||||
|
||||
class EventQueue : public SpineObject {
|
||||
class SP_API EventQueue : public SpineObject {
|
||||
friend class AnimationState;
|
||||
|
||||
private:
|
||||
@ -307,7 +307,7 @@ namespace spine {
|
||||
void drain();
|
||||
};
|
||||
|
||||
class AnimationState : public SpineObject, public HasRendererObject {
|
||||
class SP_API AnimationState : public SpineObject, public HasRendererObject {
|
||||
friend class TrackEntry;
|
||||
friend class EventQueue;
|
||||
|
||||
@ -401,7 +401,6 @@ namespace spine {
|
||||
void enableQueue();
|
||||
|
||||
private:
|
||||
static const int Subsequent, First, Hold, HoldMix;
|
||||
|
||||
AnimationStateData* _data;
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ namespace spine {
|
||||
class Animation;
|
||||
|
||||
/// 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;
|
||||
|
||||
public:
|
||||
|
||||
@ -65,7 +65,7 @@ enum TextureWrap {
|
||||
TextureWrap_Repeat
|
||||
};
|
||||
|
||||
class AtlasPage : public SpineObject, public HasRendererObject {
|
||||
class SP_API AtlasPage : public SpineObject, public HasRendererObject {
|
||||
public:
|
||||
String name;
|
||||
Format format;
|
||||
@ -83,7 +83,7 @@ public:
|
||||
virtual ~AtlasPage() { }
|
||||
};
|
||||
|
||||
class AtlasRegion : public SpineObject {
|
||||
class SP_API AtlasRegion : public SpineObject {
|
||||
public:
|
||||
AtlasPage *page;
|
||||
String name;
|
||||
@ -99,7 +99,7 @@ public:
|
||||
|
||||
class TextureLoader;
|
||||
|
||||
class Atlas : public SpineObject {
|
||||
class SP_API Atlas : public SpineObject {
|
||||
public:
|
||||
Atlas(const String &path, TextureLoader *textureLoader);
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ namespace spine {
|
||||
/// 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.
|
||||
///
|
||||
class AtlasAttachmentLoader : public AttachmentLoader {
|
||||
class SP_API AtlasAttachmentLoader : public AttachmentLoader {
|
||||
public:
|
||||
RTTI_DECL
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include <spine/SpineString.h>
|
||||
|
||||
namespace spine {
|
||||
class Attachment : public SpineObject {
|
||||
class SP_API Attachment : public SpineObject {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
|
||||
@ -45,7 +45,7 @@ namespace spine {
|
||||
class PointAttachment;
|
||||
class ClippingAttachment;
|
||||
|
||||
class AttachmentLoader : public SpineObject {
|
||||
class SP_API AttachmentLoader : public SpineObject {
|
||||
public:
|
||||
RTTI_DECL
|
||||
|
||||
|
||||
@ -39,10 +39,11 @@
|
||||
#include <spine/SpineString.h>
|
||||
|
||||
namespace spine {
|
||||
|
||||
class Skeleton;
|
||||
class Event;
|
||||
|
||||
class AttachmentTimeline : public Timeline {
|
||||
class SP_API AttachmentTimeline : public Timeline {
|
||||
friend class SkeletonBinary;
|
||||
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
|
||||
/// 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.
|
||||
class Bone : public Updatable {
|
||||
class SP_API Bone : public Updatable {
|
||||
friend class AnimationState;
|
||||
|
||||
friend class RotateTimeline;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include <spine/SpineString.h>
|
||||
|
||||
namespace spine {
|
||||
class BoneData : public SpineObject {
|
||||
class SP_API BoneData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
namespace spine {
|
||||
/// Attachment that has a polygon for bounds checking.
|
||||
class BoundingBoxAttachment : public VertexAttachment {
|
||||
class SP_API BoundingBoxAttachment : public VertexAttachment {
|
||||
RTTI_DECL
|
||||
|
||||
explicit BoundingBoxAttachment(const String& name);
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
namespace spine {
|
||||
class SlotData;
|
||||
|
||||
class ClippingAttachment : public VertexAttachment {
|
||||
class SP_API ClippingAttachment : public VertexAttachment {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include <spine/MathUtil.h>
|
||||
|
||||
namespace spine {
|
||||
class Color : public SpineObject {
|
||||
class SP_API Color : public SpineObject {
|
||||
public:
|
||||
Color() : r(0), g(0), b(0), a(0) {
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class ColorTimeline : public CurveTimeline {
|
||||
class SP_API ColorTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
@ -62,8 +62,15 @@ public:
|
||||
Vector<float> &getFrames();
|
||||
|
||||
protected:
|
||||
static const int PREV_TIME, PREV_R, PREV_G, PREV_B, PREV_A;
|
||||
static const int R, G, B, A;
|
||||
static const int PREV_TIME;
|
||||
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:
|
||||
int _slotIndex;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
namespace spine {
|
||||
/// The interface for all constraints.
|
||||
class Constraint : public Updatable {
|
||||
class SP_API Constraint : public Updatable {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
namespace spine {
|
||||
class ContainerUtil : public SpineObject {
|
||||
class SP_API ContainerUtil : public SpineObject {
|
||||
public:
|
||||
/// 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.
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
namespace spine {
|
||||
/// Base class for frames that use an interpolation bezier curve.
|
||||
class CurveTimeline : public Timeline {
|
||||
class SP_API CurveTimeline : public Timeline {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include <map>
|
||||
|
||||
namespace spine {
|
||||
class DebugExtension : public SpineExtension {
|
||||
class SP_API DebugExtension : public SpineExtension {
|
||||
struct Allocation {
|
||||
void *address;
|
||||
size_t size;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
namespace spine {
|
||||
class VertexAttachment;
|
||||
|
||||
class DeformTimeline : public CurveTimeline {
|
||||
class SP_API DeformTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/Timeline.h>
|
||||
|
||||
namespace spine {
|
||||
class DrawOrderTimeline : public Timeline {
|
||||
class SP_API DrawOrderTimeline : public Timeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ namespace spine {
|
||||
class EventData;
|
||||
|
||||
/// Stores the current pose values for an Event.
|
||||
class Event : public SpineObject {
|
||||
class SP_API Event : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
namespace spine {
|
||||
/// Stores the setup pose values for an Event.
|
||||
class EventData : public SpineObject {
|
||||
class SP_API EventData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/Timeline.h>
|
||||
|
||||
namespace spine {
|
||||
class EventTimeline : public Timeline {
|
||||
class SP_API EventTimeline : public Timeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -32,13 +32,14 @@
|
||||
#define Spine_Extension_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <spine/dll.h>
|
||||
|
||||
#define SP_UNUSED(x) (void)(x)
|
||||
|
||||
namespace spine {
|
||||
class String;
|
||||
|
||||
class SpineExtension {
|
||||
class SP_API SpineExtension {
|
||||
public:
|
||||
template<typename T>
|
||||
static T *alloc(size_t num, const char *file, int line) {
|
||||
@ -89,7 +90,7 @@ private:
|
||||
static SpineExtension *_instance;
|
||||
};
|
||||
|
||||
class DefaultSpineExtension : public SpineExtension {
|
||||
class SP_API DefaultSpineExtension : public SpineExtension {
|
||||
public:
|
||||
DefaultSpineExtension();
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ namespace spine {
|
||||
|
||||
typedef void (*DisposeRendererObject) (void* rendererObject);
|
||||
|
||||
class HasRendererObject {
|
||||
class SP_API HasRendererObject {
|
||||
public:
|
||||
explicit HasRendererObject() : _rendererObject(NULL), _dispose(NULL) {};
|
||||
|
||||
|
||||
@ -42,12 +42,12 @@
|
||||
|
||||
namespace spine {
|
||||
template<typename K, typename V>
|
||||
class HashMap : public SpineObject {
|
||||
class SP_API HashMap : public SpineObject {
|
||||
private:
|
||||
class Entry;
|
||||
|
||||
public:
|
||||
class Pair {
|
||||
class SP_API Pair {
|
||||
public:
|
||||
explicit Pair(K &k, V &v) : key(k), value(v) {}
|
||||
|
||||
@ -55,7 +55,7 @@ public:
|
||||
V &value;
|
||||
};
|
||||
|
||||
class Entries {
|
||||
class SP_API Entries {
|
||||
public:
|
||||
friend class HashMap;
|
||||
|
||||
@ -167,7 +167,7 @@ private:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
class Entry : public SpineObject {
|
||||
class SP_API Entry : public SpineObject {
|
||||
public:
|
||||
K _key;
|
||||
V _value;
|
||||
|
||||
@ -42,7 +42,7 @@ class Skeleton;
|
||||
|
||||
class Bone;
|
||||
|
||||
class IkConstraint : public Constraint {
|
||||
class SP_API IkConstraint : public Constraint {
|
||||
friend class Skeleton;
|
||||
|
||||
friend class IkConstraintTimeline;
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
namespace spine {
|
||||
class BoneData;
|
||||
|
||||
class IkConstraintData : public SpineObject {
|
||||
class SP_API IkConstraintData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
friend class IkConstraint;
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class IkConstraintTimeline : public CurveTimeline {
|
||||
|
||||
class SP_API IkConstraintTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -53,9 +54,16 @@ namespace spine {
|
||||
void setFrame (int frameIndex, float time, float mix, int bendDirection, bool compress, bool stretch);
|
||||
|
||||
private:
|
||||
static const int PREV_TIME, PREV_MIX, PREV_BEND_DIRECTION, PREV_COMPRESS, PREV_STRETCH;
|
||||
static const int MIX, BEND_DIRECTION, COMPRESS, STRETCH;
|
||||
|
||||
static const int PREV_TIME;
|
||||
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;
|
||||
int _ikConstraintIndex;
|
||||
};
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
#endif
|
||||
|
||||
namespace spine {
|
||||
class Json : public SpineObject {
|
||||
class SP_API Json : public SpineObject {
|
||||
friend class SkeletonJson;
|
||||
|
||||
public:
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
namespace spine {
|
||||
class MeshAttachment;
|
||||
|
||||
class LinkedMesh : public SpineObject {
|
||||
class SP_API LinkedMesh : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
namespace spine {
|
||||
|
||||
class MathUtil : public SpineObject {
|
||||
class SP_API MathUtil : public SpineObject {
|
||||
private:
|
||||
MathUtil();
|
||||
|
||||
@ -92,7 +92,7 @@ public:
|
||||
static float pow(float a, float b);
|
||||
};
|
||||
|
||||
struct Interpolation {
|
||||
struct SP_API Interpolation {
|
||||
virtual float apply(float a) = 0;
|
||||
|
||||
virtual float interpolate(float start, float end, float a) {
|
||||
@ -102,7 +102,7 @@ struct Interpolation {
|
||||
virtual ~Interpolation() {};
|
||||
};
|
||||
|
||||
struct PowInterpolation: public Interpolation {
|
||||
struct SP_API PowInterpolation: public Interpolation {
|
||||
PowInterpolation(int power): power(power) {
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ struct PowInterpolation: public Interpolation {
|
||||
int power;
|
||||
};
|
||||
|
||||
struct PowOutInterpolation: public Interpolation {
|
||||
struct SP_API PowOutInterpolation: public Interpolation {
|
||||
PowOutInterpolation(int power): power(power) {
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
namespace spine {
|
||||
/// 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 SkeletonJson;
|
||||
friend class AtlasAttachmentLoader;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/VertexAttachment.h>
|
||||
|
||||
namespace spine {
|
||||
class PathAttachment : public VertexAttachment {
|
||||
class SP_API PathAttachment : public VertexAttachment {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ namespace spine {
|
||||
class Bone;
|
||||
class Slot;
|
||||
|
||||
class PathConstraint : public Constraint {
|
||||
class SP_API PathConstraint : public Constraint {
|
||||
friend class Skeleton;
|
||||
friend class PathConstraintMixTimeline;
|
||||
friend class PathConstraintPositionTimeline;
|
||||
|
||||
@ -42,7 +42,7 @@ namespace spine {
|
||||
class BoneData;
|
||||
class SlotData;
|
||||
|
||||
class PathConstraintData : public SpineObject {
|
||||
class SP_API PathConstraintData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -34,7 +34,9 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class PathConstraintMixTimeline : public CurveTimeline {
|
||||
#define SP_PATHCONSTRAINTMIXTIMELINE_ENTRIES 5
|
||||
|
||||
class SP_API PathConstraintMixTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -50,8 +52,11 @@ namespace spine {
|
||||
virtual int getPropertyId();
|
||||
|
||||
private:
|
||||
static const int PREV_TIME, PREV_ROTATE, PREV_TRANSLATE;
|
||||
static const int ROTATE, TRANSLATE;
|
||||
static const int PREV_TIME;
|
||||
static const int PREV_ROTATE;
|
||||
static const int PREV_TRANSLATE;
|
||||
static const int ROTATE;
|
||||
static const int TRANSLATE;
|
||||
|
||||
Vector<float> _frames;
|
||||
int _pathConstraintIndex;
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class PathConstraintPositionTimeline : public CurveTimeline {
|
||||
|
||||
class SP_API PathConstraintPositionTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -55,7 +56,8 @@ namespace spine {
|
||||
void setFrame(int frameIndex, float time, float value);
|
||||
|
||||
protected:
|
||||
static const int PREV_TIME, PREV_VALUE;
|
||||
static const int PREV_TIME;
|
||||
static const int PREV_VALUE;
|
||||
static const int VALUE;
|
||||
|
||||
Vector<float> _frames;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/PathConstraintPositionTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
|
||||
class SP_API PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ namespace spine {
|
||||
///
|
||||
/// 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 SkeletonJson;
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
namespace spine {
|
||||
template<typename T>
|
||||
class Pool : public SpineObject {
|
||||
class SP_API Pool : public SpineObject {
|
||||
public:
|
||||
Pool() {
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#include <string>
|
||||
|
||||
namespace spine {
|
||||
class RTTI : public SpineObject {
|
||||
class SP_API RTTI : public SpineObject {
|
||||
public:
|
||||
explicit RTTI(const std::string &className);
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ namespace spine {
|
||||
class Bone;
|
||||
|
||||
/// 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 SkeletonJson;
|
||||
friend class AtlasAttachmentLoader;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class RotateTimeline : public CurveTimeline {
|
||||
class SP_API RotateTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
friend class AnimationState;
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/TranslateTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class ScaleTimeline : public TranslateTimeline {
|
||||
class SP_API ScaleTimeline : public TranslateTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/TranslateTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class ShearTimeline : public TranslateTimeline {
|
||||
class SP_API ShearTimeline : public TranslateTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ class Skin;
|
||||
|
||||
class Attachment;
|
||||
|
||||
class Skeleton : public SpineObject {
|
||||
class SP_API Skeleton : public SpineObject {
|
||||
friend class AnimationState;
|
||||
|
||||
friend class SkeletonBounds;
|
||||
|
||||
@ -48,7 +48,7 @@ namespace spine {
|
||||
class Animation;
|
||||
class CurveTimeline;
|
||||
|
||||
class SkeletonBinary : public SpineObject {
|
||||
class SP_API SkeletonBinary : public SpineObject {
|
||||
public:
|
||||
static const int BONE_ROTATE;
|
||||
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.
|
||||
/// The polygon vertices are provided along with convenience methods for doing hit detection.
|
||||
///
|
||||
class SkeletonBounds : public SpineObject {
|
||||
class SP_API SkeletonBounds : public SpineObject {
|
||||
public:
|
||||
SkeletonBounds();
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ namespace spine {
|
||||
class Slot;
|
||||
class ClippingAttachment;
|
||||
|
||||
class SkeletonClipping : public SpineObject {
|
||||
class SP_API SkeletonClipping : public SpineObject {
|
||||
public:
|
||||
SkeletonClipping();
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ class TransformConstraintData;
|
||||
class PathConstraintData;
|
||||
|
||||
/// 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 SkeletonJson;
|
||||
|
||||
@ -54,7 +54,7 @@ class LinkedMesh;
|
||||
|
||||
class String;
|
||||
|
||||
class SkeletonJson : public SpineObject {
|
||||
class SP_API SkeletonJson : public SpineObject {
|
||||
public:
|
||||
explicit SkeletonJson(Atlas *atlas);
|
||||
|
||||
|
||||
@ -42,15 +42,15 @@ class Skeleton;
|
||||
/// Stores attachments by slot index and attachment name.
|
||||
/// See SkeletonData::getDefaultSkin, Skeleton::getSkin, and
|
||||
/// http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide.
|
||||
class Skin : public SpineObject {
|
||||
class SP_API Skin : public SpineObject {
|
||||
friend class Skeleton;
|
||||
|
||||
public:
|
||||
class AttachmentMap : public SpineObject {
|
||||
class SP_API AttachmentMap : public SpineObject {
|
||||
friend class Skin;
|
||||
|
||||
public:
|
||||
struct Entry {
|
||||
struct SP_API Entry {
|
||||
size_t _slotIndex;
|
||||
String _name;
|
||||
Attachment *_attachment;
|
||||
@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class Entries {
|
||||
class SP_API Entries {
|
||||
friend class AttachmentMap;
|
||||
|
||||
public:
|
||||
|
||||
@ -46,7 +46,7 @@ class Skeleton;
|
||||
|
||||
class Attachment;
|
||||
|
||||
class Slot : public SpineObject {
|
||||
class SP_API Slot : public SpineObject {
|
||||
friend class VertexAttachment;
|
||||
|
||||
friend class Skeleton;
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
namespace spine {
|
||||
class BoneData;
|
||||
|
||||
class SlotData : public SpineObject {
|
||||
class SP_API SlotData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
namespace spine {
|
||||
class String : public SpineObject {
|
||||
class SP_API String : public SpineObject {
|
||||
public:
|
||||
String() : _length(0), _buffer(NULL) {
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
namespace spine {
|
||||
class AtlasPage;
|
||||
|
||||
class TextureLoader : public SpineObject {
|
||||
class SP_API TextureLoader : public SpineObject {
|
||||
public:
|
||||
TextureLoader();
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ class Skeleton;
|
||||
|
||||
class Event;
|
||||
|
||||
class Timeline : public SpineObject {
|
||||
class SP_API Timeline : public SpineObject {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
|
||||
@ -40,7 +40,7 @@ namespace spine {
|
||||
class Skeleton;
|
||||
class Bone;
|
||||
|
||||
class TransformConstraint : public Constraint {
|
||||
class SP_API TransformConstraint : public Constraint {
|
||||
friend class Skeleton;
|
||||
friend class TransformConstraintTimeline;
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
namespace spine {
|
||||
class BoneData;
|
||||
|
||||
class TransformConstraintData : public SpineObject {
|
||||
class SP_API TransformConstraintData : public SpineObject {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class TransformConstraintTimeline : public CurveTimeline {
|
||||
|
||||
class SP_API TransformConstraintTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -52,8 +53,15 @@ namespace spine {
|
||||
void setFrame(size_t frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
|
||||
|
||||
private:
|
||||
static const int PREV_TIME, PREV_ROTATE, PREV_TRANSLATE, PREV_SCALE, PREV_SHEAR;
|
||||
static const int ROTATE, TRANSLATE, SCALE, SHEAR;
|
||||
static const int PREV_TIME;
|
||||
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;
|
||||
int _transformConstraintIndex;
|
||||
|
||||
@ -37,7 +37,8 @@
|
||||
#include <spine/TimelineType.h>
|
||||
|
||||
namespace spine {
|
||||
class TranslateTimeline : public CurveTimeline {
|
||||
|
||||
class SP_API TranslateTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -58,8 +59,11 @@ namespace spine {
|
||||
void setFrame(int frameIndex, float time, float x, float y);
|
||||
|
||||
protected:
|
||||
static const int PREV_TIME, PREV_X, PREV_Y;
|
||||
static const int X, Y;
|
||||
static const int PREV_TIME;
|
||||
static const int PREV_X;
|
||||
static const int PREV_Y;
|
||||
static const int X;
|
||||
static const int Y;
|
||||
|
||||
Vector<float> _frames;
|
||||
int _boneIndex;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include <spine/Pool.h>
|
||||
|
||||
namespace spine {
|
||||
class Triangulator : public SpineObject {
|
||||
class SP_API Triangulator : public SpineObject {
|
||||
public:
|
||||
~Triangulator();
|
||||
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
#include <spine/CurveTimeline.h>
|
||||
|
||||
namespace spine {
|
||||
class TwoColorTimeline : public CurveTimeline {
|
||||
|
||||
class SP_API TwoColorTimeline : public CurveTimeline {
|
||||
friend class SkeletonBinary;
|
||||
friend class SkeletonJson;
|
||||
|
||||
@ -56,9 +57,21 @@ namespace spine {
|
||||
void setSlotIndex(int inValue);
|
||||
|
||||
private:
|
||||
static const int PREV_TIME, PREV_R, PREV_G, PREV_B, PREV_A;
|
||||
static const int PREV_R2, PREV_G2, PREV_B2;
|
||||
static const int R, G, B, A, R2, G2, B2;
|
||||
static const int PREV_TIME;
|
||||
static const int PREV_R;
|
||||
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, ...
|
||||
int _slotIndex;
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include <spine/SpineObject.h>
|
||||
|
||||
namespace spine {
|
||||
class Updatable : public SpineObject {
|
||||
class SP_API Updatable : public SpineObject {
|
||||
RTTI_DECL
|
||||
|
||||
public:
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
namespace spine {
|
||||
template<typename T>
|
||||
class Vector : public SpineObject {
|
||||
class SP_API Vector : public SpineObject {
|
||||
public:
|
||||
Vector() : _size(0), _capacity(0), _buffer(NULL) {
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ namespace spine {
|
||||
class Slot;
|
||||
|
||||
/// 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 SkeletonJson;
|
||||
friend class DeformTimeline;
|
||||
|
||||
@ -39,14 +39,14 @@ namespace spine {
|
||||
class Skeleton;
|
||||
class Color;
|
||||
|
||||
class VertexEffect: public SpineObject {
|
||||
class SP_API VertexEffect: public SpineObject {
|
||||
public:
|
||||
virtual void begin(Skeleton& skeleton) = 0;
|
||||
virtual void transform(float& x, float& y, float &u, float &v, Color &light, Color &dark) = 0;
|
||||
virtual void end() = 0;
|
||||
};
|
||||
|
||||
class JitterVertexEffect: public VertexEffect {
|
||||
class SP_API JitterVertexEffect: public VertexEffect {
|
||||
public:
|
||||
JitterVertexEffect(float jitterX, float jitterY);
|
||||
|
||||
@ -65,7 +65,7 @@ protected:
|
||||
float _jitterY;
|
||||
};
|
||||
|
||||
class SwirlVertexEffect: public VertexEffect {
|
||||
class SP_API SwirlVertexEffect: public VertexEffect {
|
||||
public:
|
||||
SwirlVertexEffect(float radius, Interpolation &interpolation);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <spine/Vector.h>
|
||||
|
||||
namespace spine {
|
||||
class Vertices : public SpineObject {
|
||||
class SP_API Vertices : public SpineObject {
|
||||
public:
|
||||
Vector<size_t> _bones;
|
||||
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;
|
||||
}
|
||||
|
||||
const int AnimationState::Subsequent = 0;
|
||||
const int AnimationState::First = 1;
|
||||
const int AnimationState::Hold = 2;
|
||||
const int AnimationState::HoldMix = 3;
|
||||
const int Subsequent = 0;
|
||||
const int First = 1;
|
||||
const int Hold = 2;
|
||||
const int HoldMix = 3;
|
||||
|
||||
AnimationState::AnimationState(AnimationStateData *data) :
|
||||
_data(data),
|
||||
@ -416,7 +416,7 @@ bool AnimationState::apply(Skeleton &skeleton) {
|
||||
Timeline *timeline = timelines[ii];
|
||||
assert(timeline);
|
||||
|
||||
MixBlend timelineBlend = timelineMode[ii] == AnimationState::Subsequent ? blend : MixBlend_Setup;
|
||||
MixBlend timelineBlend = timelineMode[ii] == Subsequent ? blend : MixBlend_Setup;
|
||||
|
||||
RotateTimeline *rotateTimeline = NULL;
|
||||
if (timeline->getRTTI().isExactly(RotateTimeline::rtti)) {
|
||||
@ -780,17 +780,17 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle
|
||||
MixBlend timelineBlend;
|
||||
float alpha;
|
||||
switch (timelineMode[i]) {
|
||||
case AnimationState::Subsequent:
|
||||
case Subsequent:
|
||||
if (!attachments && (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))) continue;
|
||||
if (!drawOrder && (timeline->getRTTI().isExactly(DrawOrderTimeline::rtti))) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case AnimationState::First:
|
||||
case First:
|
||||
timelineBlend = MixBlend_Setup;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case AnimationState::Hold:
|
||||
case Hold:
|
||||
timelineBlend = MixBlend_Setup;
|
||||
alpha = alphaHold;
|
||||
break;
|
||||
@ -969,7 +969,7 @@ void AnimationState::setTimelineModes(TrackEntry *entry) {
|
||||
for (size_t i = 0; i < timelinesCount; i++) {
|
||||
int id = timelines[i]->getPropertyId();
|
||||
if (!_propertyIDs.contains(id)) _propertyIDs.add(id);
|
||||
timelineMode[i] = AnimationState::Hold;
|
||||
timelineMode[i] = Hold;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -980,24 +980,24 @@ void AnimationState::setTimelineModes(TrackEntry *entry) {
|
||||
for (; i < timelinesCount; ++i) {
|
||||
int id = timelines[i]->getPropertyId();
|
||||
if (_propertyIDs.contains(id)) {
|
||||
timelineMode[i] = AnimationState::Subsequent;
|
||||
timelineMode[i] = Subsequent;
|
||||
} else {
|
||||
_propertyIDs.add(id);
|
||||
|
||||
if (to == NULL || !hasTimeline(to, id)) {
|
||||
timelineMode[i] = AnimationState::First;
|
||||
timelineMode[i] = First;
|
||||
} else {
|
||||
for (TrackEntry *next = to->_mixingTo; next != NULL; next = next->_mixingTo) {
|
||||
if (hasTimeline(next, id)) continue;
|
||||
if (entry->_mixDuration > 0) {
|
||||
timelineMode[i] = AnimationState::HoldMix;
|
||||
timelineMode[i] = HoldMix;
|
||||
timelineHoldMix[i] = entry;
|
||||
i++;
|
||||
goto continue_outer; // continue outer;
|
||||
}
|
||||
break;
|
||||
}
|
||||
timelineMode[i] = AnimationState::Hold;
|
||||
timelineMode[i] = Hold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user