mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[cpp][sfml] Backported changes from 3.7-beta-cpp branch. See #1192.
This commit is contained in:
parent
cdc37a5554
commit
02c6f9cc63
@ -1,15 +1,15 @@
|
|||||||
Spine Runtimes Software License v2.5
|
spine Runtimes Software License v2.5
|
||||||
|
|
||||||
Copyright (c) 2013-2016, Esoteric Software
|
Copyright (c) 2013-2016, Esoteric Software
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
You are granted a perpetual, non-exclusive, non-sublicensable, and
|
You are granted a perpetual, non-exclusive, non-sublicensable, and
|
||||||
non-transferable license to use, install, execute, and perform the Spine
|
non-transferable license to use, install, execute, and perform the spine
|
||||||
Runtimes software and derivative works solely for personal or internal
|
Runtimes software and derivative works solely for personal or internal
|
||||||
use. Without the written permission of Esoteric Software (see Section 2 of
|
use. Without the written permission of Esoteric Software (see Section 2 of
|
||||||
the Spine Software License Agreement), you may not (a) modify, translate,
|
the spine Software License Agreement), you may not (a) modify, translate,
|
||||||
adapt, or develop new applications using the Spine Runtimes or otherwise
|
adapt, or develop new applications using the spine Runtimes or otherwise
|
||||||
create derivative works or improvements of the Spine Runtimes or (b) remove,
|
create derivative works or improvements of the spine Runtimes or (b) remove,
|
||||||
delete, alter, or obscure any trademarks or any copyright, trademark, patent,
|
delete, alter, or obscure any trademarks or any copyright, trademark, patent,
|
||||||
or other intellectual property or proprietary rights notices on or in the
|
or other intellectual property or proprietary rights notices on or in the
|
||||||
Software, including any copy thereof. Redistributions in binary or source
|
Software, including any copy thereof. Redistributions in binary or source
|
||||||
|
|||||||
@ -1,39 +1,47 @@
|
|||||||
# spine-cpp
|
# spine-cpp
|
||||||
|
|
||||||
The spine-cpp runtime provides basic functionality to load and manipulate [Spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable Spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr.
|
The spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr.
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
|
|
||||||
This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid [Spine license](https://esotericsoftware.com/spine-purchase). Please see the [Spine Runtimes Software License](http://esotericsoftware.com/git/spine-runtimes/blob/LICENSE) for detailed information.
|
This spine Runtime may only be used for personal or internal use, typically to evaluate spine before purchasing. If you would like to incorporate a spine Runtime into your applications, distribute software containing a spine Runtime, or modify a spine Runtime, then you will need a valid [spine license](https://esotericsoftware.com/spine-purchase). Please see the [spine Runtimes Software License](http://esotericsoftware.com/git/spine-runtimes/blob/LICENSE) for detailed information.
|
||||||
|
|
||||||
The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, `Section 2` of the [Spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the Spine Runtimes.
|
The spine Runtimes are developed with the intent to be used with data exported from spine. By purchasing spine, `Section 2` of the [spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the spine Runtimes.
|
||||||
|
|
||||||
## Spine version
|
## spine version
|
||||||
|
|
||||||
spine-cpp works with data exported from Spine 3.6.xx.
|
spine-cpp works with data exported from spine 3.7.xx.
|
||||||
|
|
||||||
spine-cpp supports all Spine features.
|
spine-cpp supports all spine features.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
|
1. Download the spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
|
||||||
2. Create a new project and import the source.
|
2. Copy the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.
|
||||||
|
|
||||||
Alternatively, the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories can be copied into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.
|
|
||||||
|
|
||||||
## Extension
|
## Extension
|
||||||
|
|
||||||
Extending spine-cpp requires implementing both the SpineExtension class (which has a handy default instance) and the TextureLoader class:
|
Extending spine-cpp requires implementing both the `SpineExtension` class and the TextureLoader class:
|
||||||
|
|
||||||
Spine::SpineExtension::setInstance(Spine::DefaultSpineExtension::getInstance());
|
```
|
||||||
|
#include <spine/Extension.h>
|
||||||
|
void spine::SpineExtension *spine::getDefaultExtension() {
|
||||||
|
return new spine::DefaultExtension();
|
||||||
|
}
|
||||||
|
|
||||||
class MyTextureLoader : public TextureLoader
|
class MyTextureLoader : public spine::TextureLoader
|
||||||
{
|
{
|
||||||
virtual void load(AtlasPage& page, const String& path) { // TODO }
|
virtual void load(spine::AtlasPage& page, const spine::String& path) {
|
||||||
|
void* texture = ... load the texture based on path ...
|
||||||
|
page->setRendererObject(texture); // use the texture later in your rendering code
|
||||||
|
}
|
||||||
|
|
||||||
virtual void unload(void* texture) { // TODO }
|
virtual void unload(void* texture) { // TODO }
|
||||||
};
|
};
|
||||||
|
```
|
||||||
|
|
||||||
## Runtimes extending spine-cpp
|
## Runtimes extending spine-cpp
|
||||||
|
|
||||||
- Coming Soon!
|
- [spine-sfml](../spine-sfml/cpp)
|
||||||
|
- [spine-cocos2dx](../spine-cocos2dx)
|
||||||
|
- [spine-ue4](../spine-ue4)
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# spine-cpp-unit-tests
|
# spine-cpp-unit-tests
|
||||||
|
|
||||||
The spine-cpp-unit-tests project is to test the [Spine](http://esotericsoftware.com) skeletal animation system. It does not perform rendering. It is primarily used for regression testing and leak detection. It is designed to be run from a Continuous Integration server and to passively verify changes automatically on check-in.
|
The spine-cpp-unit-tests project is to test the [spine](http://esotericsoftware.com) skeletal animation system. It does not perform rendering. It is primarily used for regression testing and leak detection. It is designed to be run from a Continuous Integration server and to passively verify changes automatically on check-in.
|
||||||
|
|
||||||
## Mini CPP Unit Testing
|
## Mini CPP Unit Testing
|
||||||
[MiniCppUnit](https://sourceforge.net/p/minicppunit/wiki/Home/) is a minimal unit testing framework similar to JUnit. It is used here to avoid large dependancies.
|
[MiniCppUnit](https://sourceforge.net/p/minicppunit/wiki/Home/) is a minimal unit testing framework similar to JUnit. It is used here to avoid large dependancies.
|
||||||
@ -42,9 +42,9 @@ msbuild spine_unit_test.sln /t:spine_unit_test /p:Configuration="Debug" /p:Platf
|
|||||||
|
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
This Spine Runtime may only be used for personal or internal use, typically to evaluate Spine before purchasing. If you would like to incorporate a Spine Runtime into your applications, distribute software containing a Spine Runtime, or modify a Spine Runtime, then you will need a valid [Spine license](https://esotericsoftware.com/spine-purchase). Please see the [Spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information.
|
This spine Runtime may only be used for personal or internal use, typically to evaluate spine before purchasing. If you would like to incorporate a spine Runtime into your applications, distribute software containing a spine Runtime, or modify a spine Runtime, then you will need a valid [spine license](https://esotericsoftware.com/spine-purchase). Please see the [spine Runtimes Software License](https://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE) for detailed information.
|
||||||
|
|
||||||
The Spine Runtimes are developed with the intent to be used with data exported from Spine. By purchasing Spine, `Section 2` of the [Spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the Spine Runtimes.
|
The spine Runtimes are developed with the intent to be used with data exported from spine. By purchasing spine, `Section 2` of the [spine Software License](https://esotericsoftware.com/files/license.txt) grants the right to create and distribute derivative works of the spine Runtimes.
|
||||||
|
|
||||||
original "walk"": 330
|
original "walk"": 330
|
||||||
second "walk": 0d0
|
second "walk": 0d0
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
#pragma warning ( disable : 4710 )
|
#pragma warning ( disable : 4710 )
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
void loadBinary(const String &binaryFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData,
|
void loadBinary(const String &binaryFile, const String &atlasFile, Atlas *&atlas, SkeletonData *&skeletonData,
|
||||||
AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) {
|
AnimationStateData *&stateData, Skeleton *&skeleton, AnimationState *&state) {
|
||||||
@ -123,11 +123,17 @@ void testLoading() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace spine {
|
||||||
|
SpineExtension* getDefaultExtension() {
|
||||||
|
return new DefaultSpineExtension();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
DebugExtension *ext = new DebugExtension();
|
DebugExtension debug(SpineExtension::getInstance());
|
||||||
SpineExtension::setInstance(ext);
|
SpineExtension::setInstance(&debug);
|
||||||
|
|
||||||
testLoading();
|
testLoading();
|
||||||
|
|
||||||
ext->reportLeaks();
|
debug.reportLeaks();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,16 +35,16 @@
|
|||||||
#include <spine/MixBlend.h>
|
#include <spine/MixBlend.h>
|
||||||
#include <spine/MixDirection.h>
|
#include <spine/MixDirection.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Timeline;
|
class Timeline;
|
||||||
|
|
||||||
class Skeleton;
|
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;
|
||||||
|
|||||||
@ -35,9 +35,10 @@
|
|||||||
#include <spine/Pool.h>
|
#include <spine/Pool.h>
|
||||||
#include <spine/MixBlend.h>
|
#include <spine/MixBlend.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
#include <spine/HasRendererObject.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum EventType {
|
enum EventType {
|
||||||
EventType_Start,
|
EventType_Start,
|
||||||
EventType_Interrupt,
|
EventType_Interrupt,
|
||||||
@ -56,16 +57,18 @@ namespace Spine {
|
|||||||
class Skeleton;
|
class Skeleton;
|
||||||
class RotateTimeline;
|
class RotateTimeline;
|
||||||
|
|
||||||
typedef void (*OnAnimationEventFunc) (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 {
|
class SP_API TrackEntry : public SpineObject, public HasRendererObject {
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
friend class AnimationState;
|
friend class AnimationState;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TrackEntry();
|
TrackEntry();
|
||||||
|
|
||||||
|
virtual ~TrackEntry();
|
||||||
|
|
||||||
/// The index of the track where this entry is either current or queued.
|
/// The index of the track where this entry is either current or queued.
|
||||||
int getTrackIndex();
|
int getTrackIndex();
|
||||||
|
|
||||||
@ -236,8 +239,7 @@ namespace Spine {
|
|||||||
/// TrackEntry chooses the short way the first time it is applied and remembers that direction.
|
/// TrackEntry chooses the short way the first time it is applied and remembers that direction.
|
||||||
void resetRotationDirections();
|
void resetRotationDirections();
|
||||||
|
|
||||||
void setOnAnimationEventFunc(OnAnimationEventFunc inValue);
|
void setListener(AnimationStateListener listener);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Animation* _animation;
|
Animation* _animation;
|
||||||
@ -256,12 +258,12 @@ namespace Spine {
|
|||||||
Vector<int> _timelineMode;
|
Vector<int> _timelineMode;
|
||||||
Vector<TrackEntry*> _timelineHoldMix;
|
Vector<TrackEntry*> _timelineHoldMix;
|
||||||
Vector<float> _timelinesRotation;
|
Vector<float> _timelinesRotation;
|
||||||
OnAnimationEventFunc _onAnimationEventFunc;
|
AnimationStateListener _listener;
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
};
|
};
|
||||||
|
|
||||||
class EventQueueEntry : public SpineObject {
|
class SP_API EventQueueEntry : public SpineObject {
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -272,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:
|
||||||
@ -305,7 +307,7 @@ namespace Spine {
|
|||||||
void drain();
|
void drain();
|
||||||
};
|
};
|
||||||
|
|
||||||
class AnimationState : public SpineObject {
|
class SP_API AnimationState : public SpineObject, public HasRendererObject {
|
||||||
friend class TrackEntry;
|
friend class TrackEntry;
|
||||||
friend class EventQueue;
|
friend class EventQueue;
|
||||||
|
|
||||||
@ -393,13 +395,12 @@ namespace Spine {
|
|||||||
float getTimeScale();
|
float getTimeScale();
|
||||||
void setTimeScale(float inValue);
|
void setTimeScale(float inValue);
|
||||||
|
|
||||||
void setOnAnimationEventFunc(OnAnimationEventFunc inValue);
|
void setListener(AnimationStateListener listener);
|
||||||
|
|
||||||
void setRendererObject(void* inValue);
|
void disableQueue();
|
||||||
void* getRendererObject();
|
void enableQueue();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int Subsequent, First, Hold, HoldMix;
|
|
||||||
|
|
||||||
AnimationStateData* _data;
|
AnimationStateData* _data;
|
||||||
|
|
||||||
@ -411,9 +412,7 @@ namespace Spine {
|
|||||||
Vector<int> _propertyIDs;
|
Vector<int> _propertyIDs;
|
||||||
bool _animationsChanged;
|
bool _animationsChanged;
|
||||||
|
|
||||||
void* _rendererObject;
|
AnimationStateListener _listener;
|
||||||
|
|
||||||
OnAnimationEventFunc _onAnimationEventFunc;
|
|
||||||
|
|
||||||
float _timeScale;
|
float _timeScale;
|
||||||
|
|
||||||
|
|||||||
@ -33,19 +33,21 @@
|
|||||||
|
|
||||||
#include <spine/HashMap.h>
|
#include <spine/HashMap.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class SkeletonData;
|
class SkeletonData;
|
||||||
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:
|
||||||
|
explicit AnimationStateData(SkeletonData* skeletonData);
|
||||||
|
|
||||||
/// The SkeletonData to look up animations when they are specified by name.
|
/// The SkeletonData to look up animations when they are specified by name.
|
||||||
SkeletonData* getSkeletonData();
|
SkeletonData* getSkeletonData();
|
||||||
|
|
||||||
@ -53,8 +55,6 @@ namespace Spine {
|
|||||||
float getDefaultMix();
|
float getDefaultMix();
|
||||||
void setDefaultMix(float inValue);
|
void setDefaultMix(float inValue);
|
||||||
|
|
||||||
explicit AnimationStateData(SkeletonData* skeletonData);
|
|
||||||
|
|
||||||
/// Sets a mix duration by animation names.
|
/// Sets a mix duration by animation names.
|
||||||
void setMix(const String& fromName, const String& toName, float duration);
|
void setMix(const String& fromName, const String& toName, float duration);
|
||||||
|
|
||||||
|
|||||||
@ -34,9 +34,10 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/Extension.h>
|
#include <spine/Extension.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
#include <spine/HasRendererObject.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum Format {
|
enum Format {
|
||||||
Format_Alpha,
|
Format_Alpha,
|
||||||
Format_Intensity,
|
Format_Intensity,
|
||||||
@ -64,7 +65,7 @@ enum TextureWrap {
|
|||||||
TextureWrap_Repeat
|
TextureWrap_Repeat
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtlasPage : public SpineObject {
|
class SP_API AtlasPage : public SpineObject, public HasRendererObject {
|
||||||
public:
|
public:
|
||||||
String name;
|
String name;
|
||||||
Format format;
|
Format format;
|
||||||
@ -72,16 +73,17 @@ public:
|
|||||||
TextureFilter magFilter;
|
TextureFilter magFilter;
|
||||||
TextureWrap uWrap;
|
TextureWrap uWrap;
|
||||||
TextureWrap vWrap;
|
TextureWrap vWrap;
|
||||||
void *rendererObject;
|
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
explicit AtlasPage(const String &inName) : name(inName), format(Format_RGBA8888), minFilter(TextureFilter_Nearest),
|
explicit AtlasPage(const String &inName) : name(inName), format(Format_RGBA8888), minFilter(TextureFilter_Nearest),
|
||||||
magFilter(TextureFilter_Nearest), uWrap(TextureWrap_ClampToEdge),
|
magFilter(TextureFilter_Nearest), uWrap(TextureWrap_ClampToEdge),
|
||||||
vWrap(TextureWrap_ClampToEdge) {
|
vWrap(TextureWrap_ClampToEdge) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~AtlasPage() { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AtlasRegion : public SpineObject {
|
class SP_API AtlasRegion : public SpineObject {
|
||||||
public:
|
public:
|
||||||
AtlasPage *page;
|
AtlasPage *page;
|
||||||
String name;
|
String name;
|
||||||
@ -97,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);
|
||||||
|
|
||||||
@ -112,6 +114,8 @@ public:
|
|||||||
/// @return The region, or NULL.
|
/// @return The region, or NULL.
|
||||||
AtlasRegion *findRegion(const String &name);
|
AtlasRegion *findRegion(const String &name);
|
||||||
|
|
||||||
|
Vector<AtlasPage*> &getPages();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Vector<AtlasPage *> _pages;
|
Vector<AtlasPage *> _pages;
|
||||||
Vector<AtlasRegion *> _regions;
|
Vector<AtlasRegion *> _regions;
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
#include <spine/AttachmentLoader.h>
|
#include <spine/AttachmentLoader.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Atlas;
|
class Atlas;
|
||||||
class AtlasRegion;
|
class AtlasRegion;
|
||||||
|
|
||||||
@ -44,10 +44,10 @@ 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 {
|
||||||
RTTI_DECL
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
RTTI_DECL
|
||||||
|
|
||||||
explicit AtlasAttachmentLoader(Atlas* atlas);
|
explicit AtlasAttachmentLoader(Atlas* atlas);
|
||||||
|
|
||||||
virtual RegionAttachment* newRegionAttachment(Skin& skin, const String& name, const String& path);
|
virtual RegionAttachment* newRegionAttachment(Skin& skin, const String& name, const String& path);
|
||||||
@ -62,6 +62,8 @@ namespace Spine {
|
|||||||
|
|
||||||
virtual ClippingAttachment* newClippingAttachment(Skin& skin, const String& name);
|
virtual ClippingAttachment* newClippingAttachment(Skin& skin, const String& name);
|
||||||
|
|
||||||
|
virtual void configureAttachment(Attachment* attachment);
|
||||||
|
|
||||||
AtlasRegion* findRegion(const String& name);
|
AtlasRegion* findRegion(const String& name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/RTTI.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.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:
|
||||||
|
|||||||
@ -33,10 +33,11 @@
|
|||||||
|
|
||||||
#include <spine/RTTI.h>
|
#include <spine/RTTI.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Skin;
|
class Skin;
|
||||||
|
class Attachment;
|
||||||
class RegionAttachment;
|
class RegionAttachment;
|
||||||
class MeshAttachment;
|
class MeshAttachment;
|
||||||
class BoundingBoxAttachment;
|
class BoundingBoxAttachment;
|
||||||
@ -44,7 +45,8 @@ namespace Spine {
|
|||||||
class PointAttachment;
|
class PointAttachment;
|
||||||
class ClippingAttachment;
|
class ClippingAttachment;
|
||||||
|
|
||||||
class AttachmentLoader : public SpineObject {
|
class SP_API AttachmentLoader : public SpineObject {
|
||||||
|
public:
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
AttachmentLoader();
|
AttachmentLoader();
|
||||||
@ -66,6 +68,8 @@ namespace Spine {
|
|||||||
virtual PointAttachment* newPointAttachment(Skin& skin, const String& name) = 0;
|
virtual PointAttachment* newPointAttachment(Skin& skin, const String& name) = 0;
|
||||||
|
|
||||||
virtual ClippingAttachment* newClippingAttachment(Skin& skin, const String& name) = 0;
|
virtual ClippingAttachment* newClippingAttachment(Skin& skin, const String& name) = 0;
|
||||||
|
|
||||||
|
virtual void configureAttachment(Attachment* attachment) = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,13 +36,14 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/MixBlend.h>
|
#include <spine/MixBlend.h>
|
||||||
#include <spine/MixDirection.h>
|
#include <spine/MixDirection.h>
|
||||||
#include <spine/String.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;
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_AttachmentType_h
|
#ifndef Spine_AttachmentType_h
|
||||||
#define Spine_AttachmentType_h
|
#define Spine_AttachmentType_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum AttachmentType {
|
enum AttachmentType {
|
||||||
AttachmentType_Region,
|
AttachmentType_Region,
|
||||||
AttachmentType_Boundingbox,
|
AttachmentType_Boundingbox,
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_BlendMode_h
|
#ifndef Spine_BlendMode_h
|
||||||
#define Spine_BlendMode_h
|
#define Spine_BlendMode_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum BlendMode {
|
enum BlendMode {
|
||||||
BlendMode_Normal = 0,
|
BlendMode_Normal = 0,
|
||||||
BlendMode_Additive,
|
BlendMode_Additive,
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class BoneData;
|
class BoneData;
|
||||||
|
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
@ -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;
|
||||||
@ -221,6 +221,9 @@ public:
|
|||||||
/// Returns the magnitide (always positive) of the world scale Y.
|
/// Returns the magnitide (always positive) of the world scale Y.
|
||||||
float getWorldScaleY();
|
float getWorldScaleY();
|
||||||
|
|
||||||
|
bool isAppliedValid();
|
||||||
|
void setAppliedValid(bool valid);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool yDown;
|
static bool yDown;
|
||||||
|
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
#include <spine/TransformMode.h>
|
#include <spine/TransformMode.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.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;
|
||||||
|
|||||||
@ -34,9 +34,9 @@
|
|||||||
#include <spine/VertexAttachment.h>
|
#include <spine/VertexAttachment.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
#include <spine/VertexAttachment.h>
|
#include <spine/VertexAttachment.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
#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) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -33,9 +33,9 @@
|
|||||||
|
|
||||||
#include <spine/Updatable.h>
|
#include <spine/Updatable.h>
|
||||||
|
|
||||||
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:
|
||||||
|
|||||||
@ -35,12 +35,12 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/HashMap.h>
|
#include <spine/HashMap.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
#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.
|
||||||
|
|||||||
@ -34,9 +34,9 @@
|
|||||||
#include <spine/Timeline.h>
|
#include <spine/Timeline.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
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:
|
||||||
|
|||||||
@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class DebugExtension : public DefaultSpineExtension {
|
class SP_API DebugExtension : public SpineExtension {
|
||||||
struct Allocation {
|
struct Allocation {
|
||||||
void *address;
|
void *address;
|
||||||
size_t size;
|
size_t size;
|
||||||
@ -51,14 +51,14 @@ class DebugExtension : public DefaultSpineExtension {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DebugExtension(): _allocations(0), _reallocations(0), _frees(0) {
|
DebugExtension(SpineExtension* extension): _extension(extension), _allocations(0), _reallocations(0), _frees(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void reportLeaks() {
|
void reportLeaks() {
|
||||||
for (std::map<void*, Allocation>::iterator it = _allocated.begin(); it != _allocated.end(); it++) {
|
for (std::map<void*, Allocation>::iterator it = _allocated.begin(); it != _allocated.end(); it++) {
|
||||||
printf("\"%s:%i (%zu bytes at %p)\n", it->second.fileName, it->second.line, it->second.size, it->second.address);
|
printf("\"%s:%i (%zu bytes at %p)\n", it->second.fileName, it->second.line, it->second.size, it->second.address);
|
||||||
}
|
}
|
||||||
printf("allocations: %lu, reallocations: %lu, frees: %lu\n", _allocations, _reallocations, _frees);
|
printf("allocations: %zu, reallocations: %zu, frees: %zu\n", _allocations, _reallocations, _frees);
|
||||||
if (_allocated.empty()) printf("No leaks detected");
|
if (_allocated.empty()) printf("No leaks detected");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,16 +66,15 @@ public:
|
|||||||
_allocated.clear();
|
_allocated.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void *_alloc(size_t size, const char *file, int line) {
|
virtual void *_alloc(size_t size, const char *file, int line) {
|
||||||
void *result = DefaultSpineExtension::_alloc(size, file, line);
|
void *result = _extension->_alloc(size, file, line);
|
||||||
_allocated[result] = Allocation(result, size, file, line);
|
_allocated[result] = Allocation(result, size, file, line);
|
||||||
_allocations++;
|
_allocations++;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void *_calloc(size_t size, const char *file, int line) {
|
virtual void *_calloc(size_t size, const char *file, int line) {
|
||||||
void *result = DefaultSpineExtension::_calloc(size, file, line);
|
void *result = _extension->_calloc(size, file, line);
|
||||||
_allocated[result] = Allocation(result, size, file, line);
|
_allocated[result] = Allocation(result, size, file, line);
|
||||||
_allocations++;
|
_allocations++;
|
||||||
return result;
|
return result;
|
||||||
@ -83,7 +82,7 @@ protected:
|
|||||||
|
|
||||||
virtual void *_realloc(void *ptr, size_t size, const char *file, int line) {
|
virtual void *_realloc(void *ptr, size_t size, const char *file, int line) {
|
||||||
_allocated.erase(ptr);
|
_allocated.erase(ptr);
|
||||||
void *result = DefaultSpineExtension::_realloc(ptr, size, file, line);
|
void *result = _extension->_realloc(ptr, size, file, line);
|
||||||
_reallocations++;
|
_reallocations++;
|
||||||
_allocated[result] = Allocation(result, size, file, line);
|
_allocated[result] = Allocation(result, size, file, line);
|
||||||
return result;
|
return result;
|
||||||
@ -91,17 +90,22 @@ protected:
|
|||||||
|
|
||||||
virtual void _free(void *mem, const char *file, int line) {
|
virtual void _free(void *mem, const char *file, int line) {
|
||||||
if (_allocated.count(mem)) {
|
if (_allocated.count(mem)) {
|
||||||
DefaultSpineExtension::_free(mem, file, line);
|
_extension->_free(mem, file, line);
|
||||||
_frees++;
|
_frees++;
|
||||||
_allocated.erase(mem);
|
_allocated.erase(mem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("%s:%i (address %p): Double free or not allocated through SpineExtension\n", file, line, mem);
|
printf("%s:%i (address %p): Double free or not allocated through SpineExtension\n", file, line, mem);
|
||||||
DefaultSpineExtension::_free(mem, file, line);
|
_extension->_free(mem, file, line);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual char *_readFile(const String &path, int *length) {
|
||||||
|
return _extension->_readFile(path, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
SpineExtension* _extension;
|
||||||
std::map<void*, Allocation> _allocated;
|
std::map<void*, Allocation> _allocated;
|
||||||
size_t _allocations;
|
size_t _allocations;
|
||||||
size_t _reallocations;
|
size_t _reallocations;
|
||||||
|
|||||||
@ -33,10 +33,10 @@
|
|||||||
|
|
||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,13 @@
|
|||||||
#define Spine_Event_h
|
#define Spine_Event_h
|
||||||
|
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
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;
|
||||||
|
|||||||
@ -32,11 +32,11 @@
|
|||||||
#define Spine_EventData_h
|
#define Spine_EventData_h
|
||||||
|
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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) {
|
||||||
@ -70,7 +71,6 @@ public:
|
|||||||
|
|
||||||
virtual ~SpineExtension();
|
virtual ~SpineExtension();
|
||||||
|
|
||||||
protected:
|
|
||||||
/// Implement this function to use your own memory allocator
|
/// Implement this function to use your own memory allocator
|
||||||
virtual void *_alloc(size_t size, const char *file, int line) = 0;
|
virtual void *_alloc(size_t size, const char *file, int line) = 0;
|
||||||
|
|
||||||
@ -83,13 +83,14 @@ protected:
|
|||||||
|
|
||||||
virtual char *_readFile(const String &path, int *length) = 0;
|
virtual char *_readFile(const String &path, int *length) = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
SpineExtension();
|
SpineExtension();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static SpineExtension *_instance;
|
static SpineExtension *_instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DefaultSpineExtension : public SpineExtension {
|
class SP_API DefaultSpineExtension : public SpineExtension {
|
||||||
public:
|
public:
|
||||||
DefaultSpineExtension();
|
DefaultSpineExtension();
|
||||||
|
|
||||||
@ -107,18 +108,11 @@ protected:
|
|||||||
virtual char *_readFile(const String &path, int *length);
|
virtual char *_readFile(const String &path, int *length);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Allocation {
|
// This function is to be implemented by engine specific runtimes to provide
|
||||||
void *address;
|
// the default extension for that engine. It is called the first time
|
||||||
size_t size;
|
// SpineExtension::getInstance() is called, when no instance has been set
|
||||||
const char *fileName;
|
// yet.
|
||||||
int line;
|
extern SpineExtension *getDefaultExtension();
|
||||||
|
|
||||||
Allocation() : address(NULL), size(0), fileName(NULL), line(0) {
|
|
||||||
}
|
|
||||||
|
|
||||||
Allocation(void *a, size_t s, const char *f, int l) : address(a), size(s), fileName(f), line(l) {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Spine_Extension_h */
|
#endif /* Spine_Extension_h */
|
||||||
|
|||||||
59
spine-cpp/spine-cpp/include/spine/HasRendererObject.h
Normal file
59
spine-cpp/spine-cpp/include/spine/HasRendererObject.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* 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_HasRendererObject_h
|
||||||
|
#define Spine_HasRendererObject_h
|
||||||
|
|
||||||
|
namespace spine {
|
||||||
|
|
||||||
|
typedef void (*DisposeRendererObject) (void* rendererObject);
|
||||||
|
|
||||||
|
class SP_API HasRendererObject {
|
||||||
|
public:
|
||||||
|
explicit HasRendererObject() : _rendererObject(NULL), _dispose(NULL) {};
|
||||||
|
|
||||||
|
virtual ~HasRendererObject() {
|
||||||
|
if (_dispose && _rendererObject)
|
||||||
|
_dispose(_rendererObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* getRendererObject() { return _rendererObject; }
|
||||||
|
void setRendererObject(void* rendererObject, DisposeRendererObject dispose = NULL) {
|
||||||
|
_rendererObject = rendererObject;
|
||||||
|
_dispose = dispose;
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
void *_rendererObject;
|
||||||
|
DisposeRendererObject _dispose;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -40,14 +40,14 @@
|
|||||||
#pragma warning(disable:4291)
|
#pragma warning(disable:4291)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@ -35,14 +35,14 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class IkConstraintData;
|
class IkConstraintData;
|
||||||
|
|
||||||
class Skeleton;
|
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;
|
||||||
|
|||||||
@ -33,12 +33,12 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -34,12 +34,12 @@
|
|||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
#ifndef SPINE_JSON_HAVE_PREV
|
#ifndef SPINE_JSON_HAVE_PREV
|
||||||
/* Spine doesn't use the "prev" link in the Json sibling lists. */
|
/* spine doesn't use the "prev" link in the Json sibling lists. */
|
||||||
#define SPINE_JSON_HAVE_PREV 0
|
#define SPINE_JSON_HAVE_PREV 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Json : public SpineObject {
|
class SP_API Json : public SpineObject {
|
||||||
friend class SkeletonJson;
|
friend class SkeletonJson;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -32,12 +32,12 @@
|
|||||||
#define Spine_LinkedMesh_h
|
#define Spine_LinkedMesh_h
|
||||||
|
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@ -33,19 +33,20 @@
|
|||||||
|
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
#include <float.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
static const float PI = 3.1415926535897932385f;
|
|
||||||
static const float PI_2 = PI * 2;
|
|
||||||
static const float DEG_RAD = (PI / 180.0f);
|
|
||||||
static const float RAD_DEG = (180.0f / PI);
|
|
||||||
|
|
||||||
class MathUtil : public SpineObject {
|
class SP_API MathUtil : public SpineObject {
|
||||||
public:
|
private:
|
||||||
MathUtil();
|
MathUtil();
|
||||||
|
|
||||||
|
public:
|
||||||
|
static const float Pi;
|
||||||
|
static const float Pi_2;
|
||||||
|
static const float Deg_Rad;
|
||||||
|
static const float Rad_Deg;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
static inline T min(T a, T b) { return a < b ? a : b; }
|
static inline T min(T a, T b) { return a < b ? a : b; }
|
||||||
|
|
||||||
@ -91,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) {
|
||||||
@ -101,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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,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) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,11 @@
|
|||||||
#include <spine/VertexAttachment.h>
|
#include <spine/VertexAttachment.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/Color.h>
|
#include <spine/Color.h>
|
||||||
|
#include <spine/HasRendererObject.h>
|
||||||
|
|
||||||
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 {
|
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;
|
||||||
@ -47,6 +48,8 @@ namespace Spine {
|
|||||||
public:
|
public:
|
||||||
explicit MeshAttachment(const String& name);
|
explicit MeshAttachment(const String& name);
|
||||||
|
|
||||||
|
virtual ~MeshAttachment();
|
||||||
|
|
||||||
void updateUVs();
|
void updateUVs();
|
||||||
|
|
||||||
virtual bool applyDeform(VertexAttachment* sourceAttachment);
|
virtual bool applyDeform(VertexAttachment* sourceAttachment);
|
||||||
@ -65,8 +68,6 @@ namespace Spine {
|
|||||||
|
|
||||||
const String& getPath();
|
const String& getPath();
|
||||||
void setPath(const String& inValue);
|
void setPath(const String& inValue);
|
||||||
void* getRendererObject();
|
|
||||||
void setRendererObject(void* inValue);
|
|
||||||
|
|
||||||
float getRegionU();
|
float getRegionU();
|
||||||
void setRegionU(float inValue);
|
void setRegionU(float inValue);
|
||||||
@ -124,7 +125,6 @@ namespace Spine {
|
|||||||
Vector<float> _regionUVs;
|
Vector<float> _regionUVs;
|
||||||
Vector<unsigned short> _triangles;
|
Vector<unsigned short> _triangles;
|
||||||
Vector<unsigned short> _edges;
|
Vector<unsigned short> _edges;
|
||||||
void* _rendererObject;
|
|
||||||
String _path;
|
String _path;
|
||||||
float _regionU;
|
float _regionU;
|
||||||
float _regionV;
|
float _regionV;
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_MixPose_h
|
#ifndef Spine_MixPose_h
|
||||||
#define Spine_MixPose_h
|
#define Spine_MixPose_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
///
|
///
|
||||||
/// Controls how a timeline is mixed with the setup or current pose.
|
/// Controls how a timeline is mixed with the setup or current pose.
|
||||||
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)
|
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_MixDirection_h
|
#ifndef Spine_MixDirection_h
|
||||||
#define Spine_MixDirection_h
|
#define Spine_MixDirection_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
///
|
///
|
||||||
/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).
|
/// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).
|
||||||
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
|
/// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|
||||||
|
|||||||
@ -35,14 +35,14 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class PathConstraintData;
|
class PathConstraintData;
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
class PathAttachment;
|
class PathAttachment;
|
||||||
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;
|
||||||
|
|||||||
@ -36,13 +36,13 @@
|
|||||||
#include <spine/RotateMode.h>
|
#include <spine/RotateMode.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
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;
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,10 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
#include <spine/Attachment.h>
|
#include <spine/Attachment.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Bone;
|
class Bone;
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -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;
|
||||||
|
|
||||||
|
|||||||
@ -36,9 +36,9 @@
|
|||||||
#include <spine/ContainerUtil.h>
|
#include <spine/ContainerUtil.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class Pool : public SpineObject {
|
class SP_API Pool : public SpineObject {
|
||||||
public:
|
public:
|
||||||
Pool() {
|
Pool() {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_PositionMode_h
|
#ifndef Spine_PositionMode_h
|
||||||
#define Spine_PositionMode_h
|
#define Spine_PositionMode_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum PositionMode {
|
enum PositionMode {
|
||||||
PositionMode_Fixed = 0,
|
PositionMode_Fixed = 0,
|
||||||
PositionMode_Percent
|
PositionMode_Percent
|
||||||
|
|||||||
@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
#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);
|
||||||
|
|
||||||
@ -61,16 +61,16 @@ private:
|
|||||||
|
|
||||||
#define RTTI_DECL \
|
#define RTTI_DECL \
|
||||||
public: \
|
public: \
|
||||||
static const Spine::RTTI rtti; \
|
static const spine::RTTI rtti; \
|
||||||
virtual const Spine::RTTI& getRTTI() const;
|
virtual const spine::RTTI& getRTTI() const;
|
||||||
|
|
||||||
#define RTTI_IMPL_NOPARENT(name) \
|
#define RTTI_IMPL_NOPARENT(name) \
|
||||||
const Spine::RTTI name::rtti(#name); \
|
const spine::RTTI name::rtti(#name); \
|
||||||
const Spine::RTTI& name::getRTTI() const { return rtti; }
|
const spine::RTTI& name::getRTTI() const { return rtti; }
|
||||||
|
|
||||||
#define RTTI_IMPL(name, parent) \
|
#define RTTI_IMPL(name, parent) \
|
||||||
const Spine::RTTI name::rtti(#name, parent::rtti); \
|
const spine::RTTI name::rtti(#name, parent::rtti); \
|
||||||
const Spine::RTTI& name::getRTTI() const { return rtti; }
|
const spine::RTTI& name::getRTTI() const { return rtti; }
|
||||||
|
|
||||||
#endif /* Spine_RTTI_h */
|
#endif /* Spine_RTTI_h */
|
||||||
|
|
||||||
|
|||||||
@ -36,14 +36,15 @@
|
|||||||
#include <spine/Color.h>
|
#include <spine/Color.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <spine/HasRendererObject.h>
|
||||||
|
|
||||||
#define NUM_UVS 8
|
#define NUM_UVS 8
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Bone;
|
class Bone;
|
||||||
|
|
||||||
/// Attachment that displays a texture region.
|
/// Attachment that displays a texture region.
|
||||||
class RegionAttachment : public Attachment {
|
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;
|
||||||
@ -62,6 +63,7 @@ namespace Spine {
|
|||||||
/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + 8.
|
/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + 8.
|
||||||
/// @param offset The worldVertices index to begin writing values.
|
/// @param offset The worldVertices index to begin writing values.
|
||||||
/// @param stride The number of worldVertices entries between the value pairs written.
|
/// @param stride The number of worldVertices entries between the value pairs written.
|
||||||
|
void computeWorldVertices(Bone& bone, float *worldVertices, size_t offset, size_t stride = 2);
|
||||||
void computeWorldVertices(Bone& bone, Vector<float>& worldVertices, size_t offset, size_t stride = 2);
|
void computeWorldVertices(Bone& bone, Vector<float>& worldVertices, size_t offset, size_t stride = 2);
|
||||||
|
|
||||||
float getX();
|
float getX();
|
||||||
@ -83,24 +85,22 @@ namespace Spine {
|
|||||||
|
|
||||||
const String& getPath();
|
const String& getPath();
|
||||||
void setPath(const String& inValue);
|
void setPath(const String& inValue);
|
||||||
void* getRendererObject();
|
|
||||||
void setRendererObject(void* inValue);
|
|
||||||
float getRegionOffsetX();
|
float getRegionOffsetX();
|
||||||
void setRegionOffsetX(float inValue);
|
void setRegionOffsetX(float inValue);
|
||||||
|
|
||||||
// Pixels stripped from the bottom left, unrotated.
|
|
||||||
float getRegionOffsetY();
|
float getRegionOffsetY();
|
||||||
void setRegionOffsetY(float inValue);
|
void setRegionOffsetY(float inValue);
|
||||||
|
|
||||||
float getRegionWidth();
|
float getRegionWidth();
|
||||||
void setRegionWidth(float inValue);
|
void setRegionWidth(float inValue);
|
||||||
|
|
||||||
// Unrotated, stripped size.
|
|
||||||
float getRegionHeight();
|
float getRegionHeight();
|
||||||
void setRegionHeight(float inValue);
|
void setRegionHeight(float inValue);
|
||||||
|
|
||||||
float getRegionOriginalWidth();
|
float getRegionOriginalWidth();
|
||||||
void setRegionOriginalWidth(float inValue);
|
void setRegionOriginalWidth(float inValue);
|
||||||
|
|
||||||
// Unrotated, unstripped size.
|
|
||||||
float getRegionOriginalHeight();
|
float getRegionOriginalHeight();
|
||||||
void setRegionOriginalHeight(float inValue);
|
void setRegionOriginalHeight(float inValue);
|
||||||
|
|
||||||
@ -121,7 +121,6 @@ namespace Spine {
|
|||||||
float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight;
|
float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight;
|
||||||
Vector<float> _vertexOffset;
|
Vector<float> _vertexOffset;
|
||||||
Vector<float> _uvs;
|
Vector<float> _uvs;
|
||||||
void* _rendererObject;
|
|
||||||
String _path;
|
String _path;
|
||||||
float _regionU;
|
float _regionU;
|
||||||
float _regionV;
|
float _regionV;
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_RotateMode_h
|
#ifndef Spine_RotateMode_h
|
||||||
#define Spine_RotateMode_h
|
#define Spine_RotateMode_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum RotateMode {
|
enum RotateMode {
|
||||||
RotateMode_Tangent = 0,
|
RotateMode_Tangent = 0,
|
||||||
RotateMode_Chain,
|
RotateMode_Chain,
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|
||||||
|
|||||||
@ -34,12 +34,12 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/MathUtil.h>
|
#include <spine/MathUtil.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
#include <spine/Color.h>
|
#include <spine/Color.h>
|
||||||
|
|
||||||
#include <limits> // std::numeric_limits
|
#include <limits> // std::numeric_limits
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class SkeletonData;
|
class SkeletonData;
|
||||||
|
|
||||||
class Bone;
|
class Bone;
|
||||||
@ -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;
|
||||||
@ -170,7 +170,7 @@ public:
|
|||||||
|
|
||||||
Bone *getRootBone();
|
Bone *getRootBone();
|
||||||
|
|
||||||
const SkeletonData *getData();
|
SkeletonData *getData();
|
||||||
|
|
||||||
Vector<Bone *> &getBones();
|
Vector<Bone *> &getBones();
|
||||||
|
|
||||||
|
|||||||
@ -34,10 +34,10 @@
|
|||||||
#include <spine/TransformMode.h>
|
#include <spine/TransformMode.h>
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
#include <spine/Color.h>
|
#include <spine/Color.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class SkeletonData;
|
class SkeletonData;
|
||||||
class Atlas;
|
class Atlas;
|
||||||
class AttachmentLoader;
|
class AttachmentLoader;
|
||||||
@ -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;
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
class BoundingBoxAttachment;
|
class BoundingBoxAttachment;
|
||||||
class Polygon;
|
class Polygon;
|
||||||
@ -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();
|
||||||
|
|
||||||
|
|||||||
@ -34,11 +34,11 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/Triangulator.h>
|
#include <spine/Triangulator.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Slot;
|
class Slot;
|
||||||
class ClippingAttachment;
|
class ClippingAttachment;
|
||||||
|
|
||||||
class SkeletonClipping : public SpineObject {
|
class SP_API SkeletonClipping : public SpineObject {
|
||||||
public:
|
public:
|
||||||
SkeletonClipping();
|
SkeletonClipping();
|
||||||
|
|
||||||
@ -48,7 +48,9 @@ namespace Spine {
|
|||||||
|
|
||||||
void clipEnd();
|
void clipEnd();
|
||||||
|
|
||||||
void clipTriangles(Vector<float>& vertices, size_t verticesLength, Vector<unsigned short>& triangles, size_t trianglesLength, Vector<float>& uvs);
|
void clipTriangles(float* vertices, unsigned short* triangles, size_t trianglesLength, float* uvs, size_t stride);
|
||||||
|
|
||||||
|
void clipTriangles(Vector<float>& vertices, Vector<unsigned short>& triangles, Vector<float>& uvs, size_t stride);
|
||||||
|
|
||||||
bool isClipping();
|
bool isClipping();
|
||||||
|
|
||||||
|
|||||||
@ -32,9 +32,9 @@
|
|||||||
#define Spine_SkeletonData_h
|
#define Spine_SkeletonData_h
|
||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class BoneData;
|
class BoneData;
|
||||||
|
|
||||||
class SlotData;
|
class SlotData;
|
||||||
@ -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;
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
Skin *findSkin(const String &skinName);
|
Skin *findSkin(const String &skinName);
|
||||||
|
|
||||||
/// @return May be NULL.
|
/// @return May be NULL.
|
||||||
EventData *findEvent(const String &eventDataName);
|
spine::EventData *findEvent(const String &eventDataName);
|
||||||
|
|
||||||
/// @return May be NULL.
|
/// @return May be NULL.
|
||||||
Animation *findAnimation(const String &animationName);
|
Animation *findAnimation(const String &animationName);
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
|
|
||||||
void setDefaultSkin(Skin *inValue);
|
void setDefaultSkin(Skin *inValue);
|
||||||
|
|
||||||
Vector<EventData *> &getEvents();
|
Vector<spine::EventData *> &getEvents();
|
||||||
|
|
||||||
Vector<Animation *> &getAnimations();
|
Vector<Animation *> &getAnimations();
|
||||||
|
|
||||||
|
|||||||
@ -33,9 +33,9 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class CurveTimeline;
|
class CurveTimeline;
|
||||||
|
|
||||||
class VertexAttachment;
|
class VertexAttachment;
|
||||||
@ -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);
|
||||||
|
|
||||||
|
|||||||
@ -32,9 +32,9 @@
|
|||||||
#define Spine_Skin_h
|
#define Spine_Skin_h
|
||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Attachment;
|
class Attachment;
|
||||||
|
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
@ -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:
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class SlotData;
|
class SlotData;
|
||||||
|
|
||||||
class Bone;
|
class Bone;
|
||||||
@ -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;
|
||||||
@ -100,8 +100,6 @@ public:
|
|||||||
|
|
||||||
bool hasDarkColor();
|
bool hasDarkColor();
|
||||||
|
|
||||||
void setHasDarkColor(bool inValue);
|
|
||||||
|
|
||||||
/// May be NULL.
|
/// May be NULL.
|
||||||
Attachment *getAttachment();
|
Attachment *getAttachment();
|
||||||
|
|
||||||
|
|||||||
@ -33,13 +33,13 @@
|
|||||||
|
|
||||||
#include <spine/BlendMode.h>
|
#include <spine/BlendMode.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
#include <spine/Color.h>
|
#include <spine/Color.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_SpacingMode_h
|
#ifndef Spine_SpacingMode_h
|
||||||
#define Spine_SpacingMode_h
|
#define Spine_SpacingMode_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum SpacingMode {
|
enum SpacingMode {
|
||||||
SpacingMode_Length = 0,
|
SpacingMode_Length = 0,
|
||||||
SpacingMode_Fixed,
|
SpacingMode_Fixed,
|
||||||
|
|||||||
@ -32,12 +32,17 @@
|
|||||||
#define Spine_Object_h
|
#define Spine_Object_h
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
namespace Spine {
|
#include <spine/dll.h>
|
||||||
|
|
||||||
|
namespace spine {
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
class SpineObject {
|
class SP_API SpineObject {
|
||||||
public:
|
public:
|
||||||
|
void *operator new(size_t sz);
|
||||||
|
|
||||||
void *operator new(size_t sz, const char *file, int line);
|
void *operator new(size_t sz, const char *file, int line);
|
||||||
|
|
||||||
void *operator new(size_t sz, void *ptr);
|
void *operator new(size_t sz, void *ptr);
|
||||||
|
|||||||
@ -42,8 +42,8 @@
|
|||||||
#pragma warning(disable:4996)
|
#pragma warning(disable:4996)
|
||||||
#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) {
|
||||||
}
|
}
|
||||||
@ -32,12 +32,12 @@
|
|||||||
#define Spine_TextureLoader_h
|
#define Spine_TextureLoader_h
|
||||||
|
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class AtlasPage;
|
class AtlasPage;
|
||||||
|
|
||||||
class TextureLoader : public SpineObject {
|
class SP_API TextureLoader : public SpineObject {
|
||||||
public:
|
public:
|
||||||
TextureLoader();
|
TextureLoader();
|
||||||
|
|
||||||
|
|||||||
@ -37,12 +37,12 @@
|
|||||||
#include <spine/MixDirection.h>
|
#include <spine/MixDirection.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class Skeleton;
|
class Skeleton;
|
||||||
|
|
||||||
class Event;
|
class Event;
|
||||||
|
|
||||||
class Timeline : public SpineObject {
|
class SP_API Timeline : public SpineObject {
|
||||||
RTTI_DECL
|
RTTI_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_TimelineType_h
|
#ifndef Spine_TimelineType_h
|
||||||
#define Spine_TimelineType_h
|
#define Spine_TimelineType_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum TimelineType {
|
enum TimelineType {
|
||||||
TimelineType_Rotate = 0,
|
TimelineType_Rotate = 0,
|
||||||
TimelineType_Translate,
|
TimelineType_Translate,
|
||||||
|
|||||||
@ -35,12 +35,12 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
class TransformConstraintData;
|
class TransformConstraintData;
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,12 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#ifndef Spine_TransformMode_h
|
#ifndef Spine_TransformMode_h
|
||||||
#define Spine_TransformMode_h
|
#define Spine_TransformMode_h
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
enum TransformMode {
|
enum TransformMode {
|
||||||
TransformMode_Normal = 0,
|
TransformMode_Normal = 0,
|
||||||
TransformMode_OnlyTranslation,
|
TransformMode_OnlyTranslation,
|
||||||
|
|||||||
@ -36,8 +36,9 @@
|
|||||||
#include <spine/Animation.h>
|
#include <spine/Animation.h>
|
||||||
#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;
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
#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();
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
#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;
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
#include <spine/RTTI.h>
|
#include <spine/RTTI.h>
|
||||||
#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:
|
||||||
|
|||||||
@ -33,14 +33,14 @@
|
|||||||
|
|
||||||
#include <spine/Extension.h>
|
#include <spine/Extension.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
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) {
|
||||||
}
|
}
|
||||||
@ -67,6 +67,10 @@ public:
|
|||||||
_size = 0;
|
_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline size_t getCapacity() const {
|
||||||
|
return _capacity;
|
||||||
|
}
|
||||||
|
|
||||||
inline size_t size() const {
|
inline size_t size() const {
|
||||||
return _size;
|
return _size;
|
||||||
}
|
}
|
||||||
@ -78,7 +82,7 @@ public:
|
|||||||
if (_capacity < newSize) {
|
if (_capacity < newSize) {
|
||||||
_capacity = (int) (_size * 1.75f);
|
_capacity = (int) (_size * 1.75f);
|
||||||
if (_capacity < 8) _capacity = 8;
|
if (_capacity < 8) _capacity = 8;
|
||||||
_buffer = Spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);
|
_buffer = spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);
|
||||||
}
|
}
|
||||||
if (oldSize < _size) {
|
if (oldSize < _size) {
|
||||||
for (size_t i = oldSize; i < _size; i++) {
|
for (size_t i = oldSize; i < _size; i++) {
|
||||||
@ -102,7 +106,7 @@ public:
|
|||||||
T valueCopy = inValue;
|
T valueCopy = inValue;
|
||||||
_capacity = (int) (_size * 1.75f);
|
_capacity = (int) (_size * 1.75f);
|
||||||
if (_capacity < 8) _capacity = 8;
|
if (_capacity < 8) _capacity = 8;
|
||||||
_buffer = Spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);
|
_buffer = spine::SpineExtension::realloc<T>(_buffer, _capacity, __FILE__, __LINE__);
|
||||||
construct(_buffer + _size++, valueCopy);
|
construct(_buffer + _size++, valueCopy);
|
||||||
} else {
|
} else {
|
||||||
construct(_buffer + _size++, inValue);
|
construct(_buffer + _size++, inValue);
|
||||||
|
|||||||
@ -35,11 +35,11 @@
|
|||||||
|
|
||||||
#include <spine/Vector.h>
|
#include <spine/Vector.h>
|
||||||
|
|
||||||
namespace Spine {
|
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;
|
||||||
@ -51,6 +51,7 @@ namespace Spine {
|
|||||||
|
|
||||||
virtual ~VertexAttachment();
|
virtual ~VertexAttachment();
|
||||||
|
|
||||||
|
void computeWorldVertices(Slot& slot, float* worldVertices);
|
||||||
void computeWorldVertices(Slot& slot, Vector<float>& worldVertices);
|
void computeWorldVertices(Slot& slot, Vector<float>& worldVertices);
|
||||||
|
|
||||||
/// Transforms local vertices to world coordinates.
|
/// Transforms local vertices to world coordinates.
|
||||||
@ -59,6 +60,7 @@ namespace Spine {
|
|||||||
/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + count.
|
/// @param worldVertices The output world vertices. Must have a length greater than or equal to offset + count.
|
||||||
/// @param offset The worldVertices index to begin writing values.
|
/// @param offset The worldVertices index to begin writing values.
|
||||||
/// @param stride The number of worldVertices entries between the value pairs written.
|
/// @param stride The number of worldVertices entries between the value pairs written.
|
||||||
|
void computeWorldVertices(Slot& slot, size_t start, size_t count, float* worldVertices, size_t offset, size_t stride = 2);
|
||||||
void computeWorldVertices(Slot& slot, size_t start, size_t count, Vector<float>& worldVertices, size_t offset, size_t stride = 2);
|
void computeWorldVertices(Slot& slot, size_t start, size_t count, Vector<float>& worldVertices, size_t offset, size_t stride = 2);
|
||||||
|
|
||||||
/// @return true if a deform originally applied to the specified attachment should be applied to this attachment.
|
/// @return true if a deform originally applied to the specified attachment should be applied to this attachment.
|
||||||
|
|||||||
@ -34,19 +34,19 @@
|
|||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/MathUtil.h>
|
#include <spine/MathUtil.h>
|
||||||
|
|
||||||
namespace Spine {
|
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);
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@
|
|||||||
|
|
||||||
#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 */
|
||||||
@ -50,6 +50,7 @@
|
|||||||
#include <spine/Constraint.h>
|
#include <spine/Constraint.h>
|
||||||
#include <spine/ContainerUtil.h>
|
#include <spine/ContainerUtil.h>
|
||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
#include <spine/Debug.h>
|
||||||
#include <spine/DeformTimeline.h>
|
#include <spine/DeformTimeline.h>
|
||||||
#include <spine/DrawOrderTimeline.h>
|
#include <spine/DrawOrderTimeline.h>
|
||||||
#include <spine/Event.h>
|
#include <spine/Event.h>
|
||||||
@ -57,6 +58,7 @@
|
|||||||
#include <spine/EventTimeline.h>
|
#include <spine/EventTimeline.h>
|
||||||
#include <spine/Extension.h>
|
#include <spine/Extension.h>
|
||||||
#include <spine/HashMap.h>
|
#include <spine/HashMap.h>
|
||||||
|
#include <spine/HasRendererObject.h>
|
||||||
#include <spine/IkConstraint.h>
|
#include <spine/IkConstraint.h>
|
||||||
#include <spine/IkConstraintData.h>
|
#include <spine/IkConstraintData.h>
|
||||||
#include <spine/IkConstraintTimeline.h>
|
#include <spine/IkConstraintTimeline.h>
|
||||||
@ -64,8 +66,8 @@
|
|||||||
#include <spine/LinkedMesh.h>
|
#include <spine/LinkedMesh.h>
|
||||||
#include <spine/MathUtil.h>
|
#include <spine/MathUtil.h>
|
||||||
#include <spine/MeshAttachment.h>
|
#include <spine/MeshAttachment.h>
|
||||||
#include <spine/MixDirection.h>
|
|
||||||
#include <spine/MixBlend.h>
|
#include <spine/MixBlend.h>
|
||||||
|
#include <spine/MixDirection.h>
|
||||||
#include <spine/PathAttachment.h>
|
#include <spine/PathAttachment.h>
|
||||||
#include <spine/PathConstraint.h>
|
#include <spine/PathConstraint.h>
|
||||||
#include <spine/PathConstraintData.h>
|
#include <spine/PathConstraintData.h>
|
||||||
@ -90,8 +92,9 @@
|
|||||||
#include <spine/Skin.h>
|
#include <spine/Skin.h>
|
||||||
#include <spine/Slot.h>
|
#include <spine/Slot.h>
|
||||||
#include <spine/SlotData.h>
|
#include <spine/SlotData.h>
|
||||||
|
#include <spine/SpacingMode.h>
|
||||||
#include <spine/SpineObject.h>
|
#include <spine/SpineObject.h>
|
||||||
#include <spine/String.h>
|
#include <spine/SpineString.h>
|
||||||
#include <spine/TextureLoader.h>
|
#include <spine/TextureLoader.h>
|
||||||
#include <spine/Timeline.h>
|
#include <spine/Timeline.h>
|
||||||
#include <spine/TimelineType.h>
|
#include <spine/TimelineType.h>
|
||||||
|
|||||||
@ -28,15 +28,18 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include <spine/Animation.h>
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <spine/Animation.h>
|
||||||
#include <spine/Timeline.h>
|
#include <spine/Timeline.h>
|
||||||
#include <spine/Skeleton.h>
|
#include <spine/Skeleton.h>
|
||||||
#include <spine/Event.h>
|
#include <spine/Event.h>
|
||||||
|
|
||||||
#include <spine/ContainerUtil.h>
|
#include <spine/ContainerUtil.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
Animation::Animation(const String &name, Vector<Timeline *> &timelines, float duration) :
|
Animation::Animation(const String &name, Vector<Timeline *> &timelines, float duration) :
|
||||||
_timelines(timelines),
|
_timelines(timelines),
|
||||||
|
|||||||
@ -28,23 +28,25 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include <spine/AnimationState.h>
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <spine/AnimationState.h>
|
||||||
#include <spine/Animation.h>
|
#include <spine/Animation.h>
|
||||||
#include <spine/Event.h>
|
#include <spine/Event.h>
|
||||||
#include <spine/AnimationStateData.h>
|
#include <spine/AnimationStateData.h>
|
||||||
#include <spine/Skeleton.h>
|
#include <spine/Skeleton.h>
|
||||||
#include <spine/RotateTimeline.h>
|
#include <spine/RotateTimeline.h>
|
||||||
|
|
||||||
#include <spine/SkeletonData.h>
|
#include <spine/SkeletonData.h>
|
||||||
#include <spine/Bone.h>
|
#include <spine/Bone.h>
|
||||||
#include <spine/BoneData.h>
|
#include <spine/BoneData.h>
|
||||||
#include <spine/AttachmentTimeline.h>
|
#include <spine/AttachmentTimeline.h>
|
||||||
#include <spine/DrawOrderTimeline.h>
|
#include <spine/DrawOrderTimeline.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
void dummyOnAnimationEventFunc(AnimationState *state, Spine::EventType type, TrackEntry *entry, Event *event = NULL) {
|
void dummyOnAnimationEventFunc(AnimationState *state, spine::EventType type, TrackEntry *entry, Event *event = NULL) {
|
||||||
SP_UNUSED(state);
|
SP_UNUSED(state);
|
||||||
SP_UNUSED(type);
|
SP_UNUSED(type);
|
||||||
SP_UNUSED(entry);
|
SP_UNUSED(entry);
|
||||||
@ -56,9 +58,11 @@ TrackEntry::TrackEntry() : _animation(NULL), _next(NULL), _mixingFrom(NULL), _mi
|
|||||||
_animationEnd(0), _animationLast(0), _nextAnimationLast(0), _delay(0), _trackTime(0),
|
_animationEnd(0), _animationLast(0), _nextAnimationLast(0), _delay(0), _trackTime(0),
|
||||||
_trackLast(0), _nextTrackLast(0), _trackEnd(0), _timeScale(1.0f), _alpha(0), _mixTime(0),
|
_trackLast(0), _nextTrackLast(0), _trackEnd(0), _timeScale(1.0f), _alpha(0), _mixTime(0),
|
||||||
_mixDuration(0), _interruptAlpha(0), _totalAlpha(0), _mixBlend(MixBlend_Replace),
|
_mixDuration(0), _interruptAlpha(0), _totalAlpha(0), _mixBlend(MixBlend_Replace),
|
||||||
_onAnimationEventFunc(dummyOnAnimationEventFunc) {
|
_listener(dummyOnAnimationEventFunc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TrackEntry::~TrackEntry() { }
|
||||||
|
|
||||||
int TrackEntry::getTrackIndex() { return _trackIndex; }
|
int TrackEntry::getTrackIndex() { return _trackIndex; }
|
||||||
|
|
||||||
Animation *TrackEntry::getAnimation() { return _animation; }
|
Animation *TrackEntry::getAnimation() { return _animation; }
|
||||||
@ -157,8 +161,8 @@ void TrackEntry::resetRotationDirections() {
|
|||||||
_timelinesRotation.clear();
|
_timelinesRotation.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackEntry::setOnAnimationEventFunc(OnAnimationEventFunc inValue) {
|
void TrackEntry::setListener(AnimationStateListener inValue) {
|
||||||
_onAnimationEventFunc = inValue;
|
_listener = inValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TrackEntry::reset() {
|
void TrackEntry::reset() {
|
||||||
@ -171,7 +175,7 @@ void TrackEntry::reset() {
|
|||||||
_timelineHoldMix.clear();
|
_timelineHoldMix.clear();
|
||||||
_timelinesRotation.clear();
|
_timelinesRotation.clear();
|
||||||
|
|
||||||
_onAnimationEventFunc = dummyOnAnimationEventFunc;
|
_listener = dummyOnAnimationEventFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventQueueEntry::EventQueueEntry(EventType eventType, TrackEntry *trackEntry, Event *event) :
|
EventQueueEntry::EventQueueEntry(EventType eventType, TrackEntry *trackEntry, Event *event) :
|
||||||
@ -241,22 +245,22 @@ void EventQueue::drain() {
|
|||||||
case EventType_Start:
|
case EventType_Start:
|
||||||
case EventType_Interrupt:
|
case EventType_Interrupt:
|
||||||
case EventType_Complete:
|
case EventType_Complete:
|
||||||
trackEntry->_onAnimationEventFunc(&state, queueEntry->_type, trackEntry, NULL);
|
trackEntry->_listener(&state, queueEntry->_type, trackEntry, NULL);
|
||||||
state._onAnimationEventFunc(&state, queueEntry->_type, trackEntry, NULL);
|
state._listener(&state, queueEntry->_type, trackEntry, NULL);
|
||||||
break;
|
break;
|
||||||
case EventType_End:
|
case EventType_End:
|
||||||
trackEntry->_onAnimationEventFunc(&state, queueEntry->_type, trackEntry, NULL);
|
trackEntry->_listener(&state, queueEntry->_type, trackEntry, NULL);
|
||||||
state._onAnimationEventFunc(&state, queueEntry->_type, trackEntry, NULL);
|
state._listener(&state, queueEntry->_type, trackEntry, NULL);
|
||||||
/* Yes, we want to fall through here */
|
/* Yes, we want to fall through here */
|
||||||
case EventType_Dispose:
|
case EventType_Dispose:
|
||||||
trackEntry->_onAnimationEventFunc(&state, EventType_Dispose, trackEntry, NULL);
|
trackEntry->_listener(&state, EventType_Dispose, trackEntry, NULL);
|
||||||
state._onAnimationEventFunc(&state, EventType_Dispose, trackEntry, NULL);
|
state._listener(&state, EventType_Dispose, trackEntry, NULL);
|
||||||
trackEntry->reset();
|
trackEntry->reset();
|
||||||
_trackEntryPool.free(trackEntry);
|
_trackEntryPool.free(trackEntry);
|
||||||
break;
|
break;
|
||||||
case EventType_Event:
|
case EventType_Event:
|
||||||
trackEntry->_onAnimationEventFunc(&state, queueEntry->_type, trackEntry, queueEntry->_event);
|
trackEntry->_listener(&state, queueEntry->_type, trackEntry, queueEntry->_event);
|
||||||
state._onAnimationEventFunc(&state, queueEntry->_type, trackEntry, queueEntry->_event);
|
state._listener(&state, queueEntry->_type, trackEntry, queueEntry->_event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,17 +269,16 @@ 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),
|
||||||
_queue(EventQueue::newEventQueue(*this, _trackEntryPool)),
|
_queue(EventQueue::newEventQueue(*this, _trackEntryPool)),
|
||||||
_animationsChanged(false),
|
_animationsChanged(false),
|
||||||
_rendererObject(NULL),
|
_listener(dummyOnAnimationEventFunc),
|
||||||
_onAnimationEventFunc(dummyOnAnimationEventFunc),
|
|
||||||
_timeScale(1) {
|
_timeScale(1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,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)) {
|
||||||
@ -609,16 +612,15 @@ void AnimationState::setTimeScale(float inValue) {
|
|||||||
_timeScale = inValue;
|
_timeScale = inValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationState::setOnAnimationEventFunc(OnAnimationEventFunc inValue) {
|
void AnimationState::setListener(AnimationStateListener inValue) {
|
||||||
_onAnimationEventFunc = inValue;
|
_listener = inValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnimationState::setRendererObject(void *inValue) {
|
void AnimationState::disableQueue() {
|
||||||
_rendererObject = inValue;
|
_queue->_drainDisabled = true;
|
||||||
}
|
}
|
||||||
|
void AnimationState::enableQueue() {
|
||||||
void *AnimationState::getRendererObject() {
|
_queue->_drainDisabled = false;
|
||||||
return _rendererObject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Animation *AnimationState::getEmptyAnimation() {
|
Animation *AnimationState::getEmptyAnimation() {
|
||||||
@ -778,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;
|
||||||
@ -944,6 +946,8 @@ void AnimationState::animationsChanged() {
|
|||||||
for (size_t i = 0, n = _tracks.size(); i < n; ++i) {
|
for (size_t i = 0, n = _tracks.size(); i < n; ++i) {
|
||||||
TrackEntry *entry = _tracks[i];
|
TrackEntry *entry = _tracks[i];
|
||||||
|
|
||||||
|
if (!entry) continue;
|
||||||
|
|
||||||
while (entry->_mixingFrom != NULL)
|
while (entry->_mixingFrom != NULL)
|
||||||
entry = entry->_mixingFrom;
|
entry = entry->_mixingFrom;
|
||||||
|
|
||||||
@ -967,7 +971,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;
|
||||||
}
|
}
|
||||||
@ -978,24 +982,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,12 +28,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include <spine/AnimationStateData.h>
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <spine/AnimationStateData.h>
|
||||||
#include <spine/SkeletonData.h>
|
#include <spine/SkeletonData.h>
|
||||||
#include <spine/Animation.h>
|
#include <spine/Animation.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
AnimationStateData::AnimationStateData(SkeletonData *skeletonData) : _skeletonData(skeletonData), _defaultMix(0) {
|
AnimationStateData::AnimationStateData(SkeletonData *skeletonData) : _skeletonData(skeletonData), _defaultMix(0) {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,15 +28,17 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/Atlas.h>
|
#include <spine/Atlas.h>
|
||||||
|
|
||||||
#include <spine/TextureLoader.h>
|
#include <spine/TextureLoader.h>
|
||||||
|
|
||||||
#include <spine/ContainerUtil.h>
|
#include <spine/ContainerUtil.h>
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
Atlas::Atlas(const String &path, TextureLoader *textureLoader) : _textureLoader(textureLoader) {
|
Atlas::Atlas(const String &path, TextureLoader *textureLoader) : _textureLoader(textureLoader) {
|
||||||
int dirLength;
|
int dirLength;
|
||||||
@ -71,7 +73,7 @@ Atlas::Atlas(const char *data, int length, const char *dir, TextureLoader *textu
|
|||||||
Atlas::~Atlas() {
|
Atlas::~Atlas() {
|
||||||
if (_textureLoader) {
|
if (_textureLoader) {
|
||||||
for (size_t i = 0, n = _pages.size(); i < n; ++i) {
|
for (size_t i = 0, n = _pages.size(); i < n; ++i) {
|
||||||
_textureLoader->unload(_pages[i]->rendererObject);
|
_textureLoader->unload(_pages[i]->getRendererObject());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ContainerUtil::cleanUpVectorOfPointers(_pages);
|
ContainerUtil::cleanUpVectorOfPointers(_pages);
|
||||||
@ -97,6 +99,10 @@ AtlasRegion *Atlas::findRegion(const String &name) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector<AtlasPage*> &Atlas::getPages() {
|
||||||
|
return _pages;
|
||||||
|
}
|
||||||
|
|
||||||
void Atlas::load(const char *begin, int length, const char *dir) {
|
void Atlas::load(const char *begin, int length, const char *dir) {
|
||||||
static const char *formatNames[] = {"", "Alpha", "Intensity", "LuminanceAlpha", "RGB565", "RGBA4444", "RGB888",
|
static const char *formatNames[] = {"", "Alpha", "Intensity", "LuminanceAlpha", "RGB565", "RGBA4444", "RGB888",
|
||||||
"RGBA8888"};
|
"RGBA8888"};
|
||||||
@ -133,15 +139,15 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
|||||||
/* size is only optional for an atlas packed with an old TexturePacker. */
|
/* size is only optional for an atlas packed with an old TexturePacker. */
|
||||||
page->width = toInt(tuple);
|
page->width = toInt(tuple);
|
||||||
page->height = toInt(tuple + 1);
|
page->height = toInt(tuple + 1);
|
||||||
assert(readTuple(&begin, end, tuple));
|
readTuple(&begin, end, tuple);
|
||||||
|
|
||||||
page->format = (Format) indexOf(formatNames, 8, tuple);
|
page->format = (Format) indexOf(formatNames, 8, tuple);
|
||||||
|
|
||||||
assert(readTuple(&begin, end, tuple));
|
readTuple(&begin, end, tuple);
|
||||||
page->minFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple);
|
page->minFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple);
|
||||||
page->magFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple + 1);
|
page->magFilter = (TextureFilter) indexOf(textureFilterNames, 8, tuple + 1);
|
||||||
|
|
||||||
assert(readValue(&begin, end, &str));
|
readValue(&begin, end, &str);
|
||||||
|
|
||||||
page->uWrap = TextureWrap_ClampToEdge;
|
page->uWrap = TextureWrap_ClampToEdge;
|
||||||
page->vWrap = TextureWrap_ClampToEdge;
|
page->vWrap = TextureWrap_ClampToEdge;
|
||||||
@ -169,14 +175,14 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
|||||||
region->page = page;
|
region->page = page;
|
||||||
region->name = String(mallocString(&str), true);
|
region->name = String(mallocString(&str), true);
|
||||||
|
|
||||||
assert(readValue(&begin, end, &str));
|
readValue(&begin, end, &str);
|
||||||
region->rotate = equals(&str, "true") ? true : false;
|
region->rotate = equals(&str, "true") ? true : false;
|
||||||
|
|
||||||
assert(readTuple(&begin, end, tuple) == 2);
|
readTuple(&begin, end, tuple);
|
||||||
region->x = toInt(tuple);
|
region->x = toInt(tuple);
|
||||||
region->y = toInt(tuple + 1);
|
region->y = toInt(tuple + 1);
|
||||||
|
|
||||||
assert(readTuple(&begin, end, tuple) == 2);
|
readTuple(&begin, end, tuple);
|
||||||
region->width = toInt(tuple);
|
region->width = toInt(tuple);
|
||||||
region->height = toInt(tuple + 1);
|
region->height = toInt(tuple + 1);
|
||||||
|
|
||||||
@ -212,7 +218,7 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
|||||||
region->pads[2] = toInt(tuple + 2);
|
region->pads[2] = toInt(tuple + 2);
|
||||||
region->pads[3] = toInt(tuple + 3);
|
region->pads[3] = toInt(tuple + 3);
|
||||||
|
|
||||||
assert(readTuple(&begin, end, tuple));
|
readTuple(&begin, end, tuple);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,7 +229,7 @@ void Atlas::load(const char *begin, int length, const char *dir) {
|
|||||||
region->offsetX = (float)toInt(tuple);
|
region->offsetX = (float)toInt(tuple);
|
||||||
region->offsetY = (float)toInt(tuple + 1);
|
region->offsetY = (float)toInt(tuple + 1);
|
||||||
|
|
||||||
assert(readValue(&begin, end, &str));
|
readValue(&begin, end, &str);
|
||||||
|
|
||||||
region->index = toInt(&str);
|
region->index = toInt(&str);
|
||||||
|
|
||||||
|
|||||||
@ -28,8 +28,11 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
******************************************************S**********************/
|
******************************************************S**********************/
|
||||||
|
|
||||||
#include <spine/AtlasAttachmentLoader.h>
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <spine/AtlasAttachmentLoader.h>
|
||||||
#include <spine/Skin.h>
|
#include <spine/Skin.h>
|
||||||
#include <spine/RegionAttachment.h>
|
#include <spine/RegionAttachment.h>
|
||||||
#include <spine/MeshAttachment.h>
|
#include <spine/MeshAttachment.h>
|
||||||
@ -40,7 +43,7 @@
|
|||||||
|
|
||||||
#include <spine/Atlas.h>
|
#include <spine/Atlas.h>
|
||||||
|
|
||||||
namespace Spine {
|
namespace spine {
|
||||||
RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader)
|
RTTI_IMPL(AtlasAttachmentLoader, AttachmentLoader)
|
||||||
|
|
||||||
AtlasAttachmentLoader::AtlasAttachmentLoader(Atlas *atlas) : AttachmentLoader(), _atlas(atlas) {
|
AtlasAttachmentLoader::AtlasAttachmentLoader(Atlas *atlas) : AttachmentLoader(), _atlas(atlas) {
|
||||||
@ -50,14 +53,14 @@ RegionAttachment *AtlasAttachmentLoader::newRegionAttachment(Skin &skin, const S
|
|||||||
SP_UNUSED(skin);
|
SP_UNUSED(skin);
|
||||||
|
|
||||||
AtlasRegion *regionP = findRegion(path);
|
AtlasRegion *regionP = findRegion(path);
|
||||||
assert(regionP != NULL);
|
if (!regionP) return NULL;
|
||||||
|
|
||||||
AtlasRegion ®ion = *regionP;
|
AtlasRegion ®ion = *regionP;
|
||||||
|
|
||||||
RegionAttachment *attachmentP = new(__FILE__, __LINE__) RegionAttachment(name);
|
RegionAttachment *attachmentP = new(__FILE__, __LINE__) RegionAttachment(name);
|
||||||
|
|
||||||
RegionAttachment &attachment = *attachmentP;
|
RegionAttachment &attachment = *attachmentP;
|
||||||
attachment._rendererObject = regionP;
|
attachment.setRendererObject(regionP);
|
||||||
attachment.setUVs(region.u, region.v, region.u2, region.v2, region.rotate);
|
attachment.setUVs(region.u, region.v, region.u2, region.v2, region.rotate);
|
||||||
attachment._regionOffsetX = region.offsetX;
|
attachment._regionOffsetX = region.offsetX;
|
||||||
attachment._regionOffsetY = region.offsetY;
|
attachment._regionOffsetY = region.offsetY;
|
||||||
@ -72,14 +75,14 @@ MeshAttachment *AtlasAttachmentLoader::newMeshAttachment(Skin &skin, const Strin
|
|||||||
SP_UNUSED(skin);
|
SP_UNUSED(skin);
|
||||||
|
|
||||||
AtlasRegion *regionP = findRegion(path);
|
AtlasRegion *regionP = findRegion(path);
|
||||||
assert(regionP != NULL);
|
if (!regionP) return NULL;
|
||||||
|
|
||||||
AtlasRegion ®ion = *regionP;
|
AtlasRegion ®ion = *regionP;
|
||||||
|
|
||||||
MeshAttachment *attachmentP = new(__FILE__, __LINE__) MeshAttachment(name);
|
MeshAttachment *attachmentP = new(__FILE__, __LINE__) MeshAttachment(name);
|
||||||
|
|
||||||
MeshAttachment &attachment = *attachmentP;
|
MeshAttachment &attachment = *attachmentP;
|
||||||
attachment._rendererObject = regionP;
|
attachment.setRendererObject(regionP);
|
||||||
attachment._regionU = region.u;
|
attachment._regionU = region.u;
|
||||||
attachment._regionV = region.v;
|
attachment._regionV = region.v;
|
||||||
attachment._regionU2 = region.u2;
|
attachment._regionU2 = region.u2;
|
||||||
@ -115,6 +118,10 @@ ClippingAttachment *AtlasAttachmentLoader::newClippingAttachment(Skin &skin, con
|
|||||||
return new(__FILE__, __LINE__) ClippingAttachment(name);
|
return new(__FILE__, __LINE__) ClippingAttachment(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AtlasAttachmentLoader::configureAttachment(Attachment* attachment) {
|
||||||
|
SP_UNUSED(attachment);
|
||||||
|
}
|
||||||
|
|
||||||
AtlasRegion *AtlasAttachmentLoader::findRegion(const String &name) {
|
AtlasRegion *AtlasAttachmentLoader::findRegion(const String &name) {
|
||||||
return _atlas->findRegion(name);
|
return _atlas->findRegion(name);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,11 +28,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/Attachment.h>
|
#include <spine/Attachment.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL_NOPARENT(Attachment)
|
RTTI_IMPL_NOPARENT(Attachment)
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,10 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/AttachmentLoader.h>
|
#include <spine/AttachmentLoader.h>
|
||||||
|
|
||||||
#include <spine/Skin.h>
|
#include <spine/Skin.h>
|
||||||
@ -38,7 +42,7 @@
|
|||||||
#include <spine/PointAttachment.h>
|
#include <spine/PointAttachment.h>
|
||||||
#include <spine/ClippingAttachment.h>
|
#include <spine/ClippingAttachment.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL_NOPARENT(AttachmentLoader)
|
RTTI_IMPL_NOPARENT(AttachmentLoader)
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,10 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/AttachmentTimeline.h>
|
#include <spine/AttachmentTimeline.h>
|
||||||
|
|
||||||
#include <spine/Skeleton.h>
|
#include <spine/Skeleton.h>
|
||||||
@ -38,7 +42,7 @@
|
|||||||
#include <spine/Slot.h>
|
#include <spine/Slot.h>
|
||||||
#include <spine/SlotData.h>
|
#include <spine/SlotData.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(AttachmentTimeline, Timeline)
|
RTTI_IMPL(AttachmentTimeline, Timeline)
|
||||||
|
|
||||||
|
|||||||
@ -28,12 +28,16 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/Bone.h>
|
#include <spine/Bone.h>
|
||||||
|
|
||||||
#include <spine/BoneData.h>
|
#include <spine/BoneData.h>
|
||||||
#include <spine/Skeleton.h>
|
#include <spine/Skeleton.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(Bone, Updatable)
|
RTTI_IMPL(Bone, Updatable)
|
||||||
|
|
||||||
@ -148,11 +152,11 @@ Bone::updateWorldTransform(float x, float y, float rotation, float scaleX, float
|
|||||||
s = MathUtil::abs(pa * pd - pb * pc) / s;
|
s = MathUtil::abs(pa * pd - pb * pc) / s;
|
||||||
pb = pc * s;
|
pb = pc * s;
|
||||||
pd = pa * s;
|
pd = pa * s;
|
||||||
prx = MathUtil::atan2(pc, pa) * RAD_DEG;
|
prx = MathUtil::atan2(pc, pa) * MathUtil::Rad_Deg;
|
||||||
} else {
|
} else {
|
||||||
pa = 0;
|
pa = 0;
|
||||||
pc = 0;
|
pc = 0;
|
||||||
prx = 90 - MathUtil::atan2(pd, pb) * RAD_DEG;
|
prx = 90 - MathUtil::atan2(pd, pb) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
rx = rotation + shearX - prx;
|
rx = rotation + shearX - prx;
|
||||||
ry = rotation + shearY - prx + 90;
|
ry = rotation + shearY - prx + 90;
|
||||||
@ -179,7 +183,7 @@ Bone::updateWorldTransform(float x, float y, float rotation, float scaleX, float
|
|||||||
za *= s;
|
za *= s;
|
||||||
zc *= s;
|
zc *= s;
|
||||||
s = MathUtil::sqrt(za * za + zc * zc);
|
s = MathUtil::sqrt(za * za + zc * zc);
|
||||||
r = PI / 2 + MathUtil::atan2(zc, za);
|
r = MathUtil::Pi / 2 + MathUtil::atan2(zc, za);
|
||||||
zb = MathUtil::cos(r) * s;
|
zb = MathUtil::cos(r) * s;
|
||||||
zd = MathUtil::sin(r) * s;
|
zd = MathUtil::sin(r) * s;
|
||||||
la = MathUtil::cosDeg(shearX) * scaleX;
|
la = MathUtil::cosDeg(shearX) * scaleX;
|
||||||
@ -233,14 +237,14 @@ float Bone::worldToLocalRotation(float worldRotation) {
|
|||||||
float sin = MathUtil::sinDeg(worldRotation);
|
float sin = MathUtil::sinDeg(worldRotation);
|
||||||
float cos = MathUtil::cosDeg(worldRotation);
|
float cos = MathUtil::cosDeg(worldRotation);
|
||||||
|
|
||||||
return MathUtil::atan2(_a * sin - _c * cos, _d * cos - _b * sin) * RAD_DEG;
|
return MathUtil::atan2(_a * sin - _c * cos, _d * cos - _b * sin) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Bone::localToWorldRotation(float localRotation) {
|
float Bone::localToWorldRotation(float localRotation) {
|
||||||
float sin = MathUtil::sinDeg(localRotation);
|
float sin = MathUtil::sinDeg(localRotation);
|
||||||
float cos = MathUtil::cosDeg(localRotation);
|
float cos = MathUtil::cosDeg(localRotation);
|
||||||
|
|
||||||
return MathUtil::atan2(cos * _c + sin * _d, cos * _a + sin * _b) * RAD_DEG;
|
return MathUtil::atan2(cos * _c + sin * _d, cos * _a + sin * _b) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bone::rotateWorld(float degrees) {
|
void Bone::rotateWorld(float degrees) {
|
||||||
@ -273,7 +277,7 @@ float Bone::getWorldToLocalRotationX() {
|
|||||||
float a = _a;
|
float a = _a;
|
||||||
float c = _c;
|
float c = _c;
|
||||||
|
|
||||||
return MathUtil::atan2(pa * c - pc * a, pd * a - pb * c) * RAD_DEG;
|
return MathUtil::atan2(pa * c - pc * a, pd * a - pb * c) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Bone::getWorldToLocalRotationY() {
|
float Bone::getWorldToLocalRotationY() {
|
||||||
@ -289,7 +293,7 @@ float Bone::getWorldToLocalRotationY() {
|
|||||||
float b = _b;
|
float b = _b;
|
||||||
float d = _d;
|
float d = _d;
|
||||||
|
|
||||||
return MathUtil::atan2(pa * d - pc * b, pd * b - pb * d) * RAD_DEG;
|
return MathUtil::atan2(pa * d - pc * b, pd * b - pb * d) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
BoneData &Bone::getData() {
|
BoneData &Bone::getData() {
|
||||||
@ -469,11 +473,11 @@ void Bone::setWorldY(float inValue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
float Bone::getWorldRotationX() {
|
float Bone::getWorldRotationX() {
|
||||||
return MathUtil::atan2(_c, _a) * RAD_DEG;
|
return MathUtil::atan2(_c, _a) * MathUtil::MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Bone::getWorldRotationY() {
|
float Bone::getWorldRotationY() {
|
||||||
return MathUtil::atan2(_d, _b) * RAD_DEG;
|
return MathUtil::atan2(_d, _b) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Bone::getWorldScaleX() {
|
float Bone::getWorldScaleX() {
|
||||||
@ -484,17 +488,24 @@ float Bone::getWorldScaleY() {
|
|||||||
return MathUtil::sqrt(_b * _b + _d * _d);
|
return MathUtil::sqrt(_b * _b + _d * _d);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Bone::isAppliedValid() {
|
||||||
|
return _appliedValid;
|
||||||
|
}
|
||||||
|
void Bone::setAppliedValid(bool valid) {
|
||||||
|
_appliedValid = valid;
|
||||||
|
}
|
||||||
|
|
||||||
void Bone::updateAppliedTransform() {
|
void Bone::updateAppliedTransform() {
|
||||||
Bone *parent = _parent;
|
Bone *parent = _parent;
|
||||||
_appliedValid = 1;
|
_appliedValid = 1;
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
_ax = _worldX;
|
_ax = _worldX;
|
||||||
_ay = _worldY;
|
_ay = _worldY;
|
||||||
_arotation = MathUtil::atan2(_c, _a) * RAD_DEG;
|
_arotation = MathUtil::atan2(_c, _a) * MathUtil::Rad_Deg;
|
||||||
_ascaleX = MathUtil::sqrt(_a * _a + _c * _c);
|
_ascaleX = MathUtil::sqrt(_a * _a + _c * _c);
|
||||||
_ascaleY = MathUtil::sqrt(_b * _b + _d * _d);
|
_ascaleY = MathUtil::sqrt(_b * _b + _d * _d);
|
||||||
_ashearX = 0;
|
_ashearX = 0;
|
||||||
_ashearY = MathUtil::atan2(_a * _b + _c * _d, _a * _d - _b * _c) * RAD_DEG;
|
_ashearY = MathUtil::atan2(_a * _b + _c * _d, _a * _d - _b * _c) * MathUtil::Rad_Deg;
|
||||||
} else {
|
} else {
|
||||||
float pa = parent->_a, pb = parent->_b, pc = parent->_c, pd = parent->_d;
|
float pa = parent->_a, pb = parent->_b, pc = parent->_c, pd = parent->_d;
|
||||||
float pid = 1 / (pa * pd - pb * pc);
|
float pid = 1 / (pa * pd - pb * pc);
|
||||||
@ -514,13 +525,13 @@ void Bone::updateAppliedTransform() {
|
|||||||
if (_ascaleX > 0.0001f) {
|
if (_ascaleX > 0.0001f) {
|
||||||
float det = ra * rd - rb * rc;
|
float det = ra * rd - rb * rc;
|
||||||
_ascaleY = det / _ascaleX;
|
_ascaleY = det / _ascaleX;
|
||||||
_ashearY = MathUtil::atan2(ra * rb + rc * rd, det) * RAD_DEG;
|
_ashearY = MathUtil::atan2(ra * rb + rc * rd, det) * MathUtil::Rad_Deg;
|
||||||
_arotation = MathUtil::atan2(rc, ra) * RAD_DEG;
|
_arotation = MathUtil::atan2(rc, ra) * MathUtil::Rad_Deg;
|
||||||
} else {
|
} else {
|
||||||
_ascaleX = 0;
|
_ascaleX = 0;
|
||||||
_ascaleY = MathUtil::sqrt(rb * rb + rd * rd);
|
_ascaleY = MathUtil::sqrt(rb * rb + rd * rd);
|
||||||
_ashearY = 0;
|
_ashearY = 0;
|
||||||
_arotation = 90 - MathUtil::atan2(rd, rb) * RAD_DEG;
|
_arotation = 90 - MathUtil::atan2(rd, rb) * MathUtil::Rad_Deg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,11 +28,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/BoneData.h>
|
#include <spine/BoneData.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
BoneData::BoneData(int index, const String &name, BoneData *parent) :
|
BoneData::BoneData(int index, const String &name, BoneData *parent) :
|
||||||
_index(index),
|
_index(index),
|
||||||
|
|||||||
@ -28,9 +28,13 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/BoundingBoxAttachment.h>
|
#include <spine/BoundingBoxAttachment.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(BoundingBoxAttachment, VertexAttachment)
|
RTTI_IMPL(BoundingBoxAttachment, VertexAttachment)
|
||||||
|
|
||||||
|
|||||||
@ -28,11 +28,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/ClippingAttachment.h>
|
#include <spine/ClippingAttachment.h>
|
||||||
|
|
||||||
#include <spine/SlotData.h>
|
#include <spine/SlotData.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(ClippingAttachment, VertexAttachment)
|
RTTI_IMPL(ClippingAttachment, VertexAttachment)
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,10 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/ColorTimeline.h>
|
#include <spine/ColorTimeline.h>
|
||||||
|
|
||||||
#include <spine/Skeleton.h>
|
#include <spine/Skeleton.h>
|
||||||
@ -38,7 +42,7 @@
|
|||||||
#include <spine/Slot.h>
|
#include <spine/Slot.h>
|
||||||
#include <spine/SlotData.h>
|
#include <spine/SlotData.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(ColorTimeline, CurveTimeline)
|
RTTI_IMPL(ColorTimeline, CurveTimeline)
|
||||||
|
|
||||||
@ -71,7 +75,7 @@ void ColorTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vector
|
|||||||
slot._color.set(slot._data._color);
|
slot._color.set(slot._data._color);
|
||||||
return;
|
return;
|
||||||
case MixBlend_First: {
|
case MixBlend_First: {
|
||||||
Color color = slot._color, setup = slot._data._color;
|
Color &color = slot._color, setup = slot._data._color;
|
||||||
color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,
|
color.add((setup.r - color.r) * alpha, (setup.g - color.g) * alpha, (setup.b - color.b) * alpha,
|
||||||
(setup.a - color.a) * alpha);
|
(setup.a - color.a) * alpha);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,9 +28,13 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/Constraint.h>
|
#include <spine/Constraint.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(Constraint, Updatable)
|
RTTI_IMPL(Constraint, Updatable)
|
||||||
|
|
||||||
|
|||||||
@ -28,11 +28,15 @@
|
|||||||
* POSSIBILITY OF SUCH DAMAGE.
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef SPINE_UE4
|
||||||
|
#include "SpinePluginPrivatePCH.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <spine/CurveTimeline.h>
|
#include <spine/CurveTimeline.h>
|
||||||
|
|
||||||
#include <spine/MathUtil.h>
|
#include <spine/MathUtil.h>
|
||||||
|
|
||||||
using namespace Spine;
|
using namespace spine;
|
||||||
|
|
||||||
RTTI_IMPL(CurveTimeline, Timeline)
|
RTTI_IMPL(CurveTimeline, Timeline)
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user