Closes #1058, spine-sfml.h doesn't define SPINE_SHORT_NAMES to avoid API collisions.

This commit is contained in:
badlogic 2018-01-10 16:50:24 +01:00
parent c3e1f9bc15
commit a3653ce51b
4 changed files with 31 additions and 23 deletions

View File

@ -1,3 +1,10 @@
# 3.7
## C
### SFML
* `spine-sfml.h` no longer defines `SPINE_SHORT_NAMES` to avoid collisions with other APIs. See #1058.
# 3.6 # 3.6
## AS3 ## AS3

View File

@ -30,6 +30,7 @@
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
#define SPINE_SHORT_NAMES
#include <spine/spine-sfml.h> #include <spine/spine-sfml.h>
#include <SFML/Graphics.hpp> #include <SFML/Graphics.hpp>
#include <SFML/Window/Mouse.hpp> #include <SFML/Window/Mouse.hpp>

View File

@ -28,6 +28,7 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/ *****************************************************************************/
#define SPINE_SHORT_NAMES
#include <spine/spine-sfml.h> #include <spine/spine-sfml.h>
#ifndef SPINE_MESH_VERTEX_COUNT_MAX #ifndef SPINE_MESH_VERTEX_COUNT_MAX

View File

@ -31,7 +31,6 @@
#ifndef SPINE_SFML_H_ #ifndef SPINE_SFML_H_
#define SPINE_SFML_H_ #define SPINE_SFML_H_
#define SPINE_SHORT_NAMES
#include <spine/spine.h> #include <spine/spine.h>
#include <spine/extension.h> #include <spine/extension.h>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
@ -46,13 +45,13 @@ namespace spine {
class SkeletonDrawable: public sf::Drawable { class SkeletonDrawable: public sf::Drawable {
public: public:
Skeleton* skeleton; spSkeleton* skeleton;
AnimationState* state; spAnimationState* state;
float timeScale; float timeScale;
sf::VertexArray* vertexArray; sf::VertexArray* vertexArray;
spVertexEffect* vertexEffect; spVertexEffect* vertexEffect;
SkeletonDrawable (SkeletonData* skeleton, AnimationStateData* stateData = 0); SkeletonDrawable (spSkeletonData* skeleton, spAnimationStateData* stateData = 0);
~SkeletonDrawable (); ~SkeletonDrawable ();
void update (float deltaTime); void update (float deltaTime);