Prechádzať zdrojové kódy

Merge branch 'NoctisGames-3.6' into 3.7-beta

badlogic 7 rokov pred
rodič
commit
5d63fabcce
100 zmenil súbory, kde vykonal 10699 pridanie a 0 odobranie
  1. 9 0
      spine-cpp/CMakeLists.txt
  2. 27 0
      spine-cpp/LICENSE
  3. 39 0
      spine-cpp/README.md
  4. 58 0
      spine-cpp/spine-cpp-unit-tests/CMakeLists.txt
  5. 67 0
      spine-cpp/spine-cpp-unit-tests/README.md
  6. 110 0
      spine-cpp/spine-cpp-unit-tests/main.cpp
  7. 303 0
      spine-cpp/spine-cpp-unit-tests/memory/KMemory.cpp
  8. 189 0
      spine-cpp/spine-cpp-unit-tests/memory/KMemory.h
  9. 185 0
      spine-cpp/spine-cpp-unit-tests/memory/KString.cpp
  10. 19 0
      spine-cpp/spine-cpp-unit-tests/memory/KString.h
  11. 279 0
      spine-cpp/spine-cpp-unit-tests/minicppunit/MiniCppUnit.cxx
  12. 504 0
      spine-cpp/spine-cpp-unit-tests/minicppunit/MiniCppUnit.hxx
  13. 831 0
      spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test.xcodeproj/project.pbxproj
  14. 7 0
      spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  15. 444 0
      spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/MemoryTest.h
  16. 197 0
      spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/SimpleTest.h
  17. 119 0
      spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/main.cpp
  18. 30 0
      spine-cpp/spine-cpp-unit-tests/teamcity/README.txt
  19. 82 0
      spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_cppunit.cpp
  20. 83 0
      spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_cppunit.h
  21. 174 0
      spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_messages.cpp
  22. 59 0
      spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_messages.h
  23. 48 0
      spine-cpp/spine-cpp-unit-tests/tests/CPP_InterfaceTestFixture.cpp
  24. 47 0
      spine-cpp/spine-cpp-unit-tests/tests/CPP_InterfaceTestFixture.h
  25. 175 0
      spine-cpp/spine-cpp-unit-tests/tests/C_InterfaceTestFixture.cpp
  26. 33 0
      spine-cpp/spine-cpp-unit-tests/tests/C_InterfaceTestFixture.h
  27. 25 0
      spine-cpp/spine-cpp-unit-tests/tests/EmptyTestFixture.cpp
  28. 26 0
      spine-cpp/spine-cpp-unit-tests/tests/EmptyTestFixture.h
  29. 339 0
      spine-cpp/spine-cpp-unit-tests/tests/MemoryTestFixture.cpp
  30. 50 0
      spine-cpp/spine-cpp-unit-tests/tests/MemoryTestFixture.h
  31. 181 0
      spine-cpp/spine-cpp-unit-tests/tests/SpineEventMonitor.cpp
  32. 121 0
      spine-cpp/spine-cpp-unit-tests/tests/SpineEventMonitor.h
  33. 26 0
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/CPP_InterfaceTestFixture.cpp
  34. 30 0
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/CPP_InterfaceTestFixture.h
  35. 26 0
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/_TestFixture.cpp
  36. 30 0
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/_TestFixture.h
  37. BIN
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/fnr.exe
  38. 17 0
      spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/makeFixture.bat
  39. 32 0
      spine-cpp/spine-cpp-unit-tests/tests/TestOptions.h
  40. 100 0
      spine-cpp/spine-cpp/include/spine/Animation.h
  41. 422 0
      spine-cpp/spine-cpp/include/spine/AnimationState.h
  42. 91 0
      spine-cpp/spine-cpp/include/spine/AnimationStateData.h
  43. 153 0
      spine-cpp/spine-cpp/include/spine/Atlas.h
  44. 71 0
      spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h
  45. 52 0
      spine-cpp/spine-cpp/include/spine/Attachment.h
  46. 72 0
      spine-cpp/spine-cpp/include/spine/AttachmentLoader.h
  47. 77 0
      spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h
  48. 46 0
      spine-cpp/spine-cpp/include/spine/AttachmentType.h
  49. 43 0
      spine-cpp/spine-cpp/include/spine/BlendMode.h
  50. 206 0
      spine-cpp/spine-cpp/include/spine/Bone.h
  51. 107 0
      spine-cpp/spine-cpp/include/spine/BoneData.h
  52. 45 0
      spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h
  53. 58 0
      spine-cpp/spine-cpp/include/spine/ClippingAttachment.h
  54. 70 0
      spine-cpp/spine-cpp/include/spine/ColorTimeline.h
  55. 53 0
      spine-cpp/spine-cpp/include/spine/Constraint.h
  56. 127 0
      spine-cpp/spine-cpp/include/spine/ContainerUtil.h
  57. 77 0
      spine-cpp/spine-cpp/include/spine/CurveTimeline.h
  58. 72 0
      spine-cpp/spine-cpp/include/spine/DeformTimeline.h
  59. 66 0
      spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h
  60. 71 0
      spine-cpp/spine-cpp/include/spine/Event.h
  61. 66 0
      spine-cpp/spine-cpp/include/spine/EventData.h
  62. 67 0
      spine-cpp/spine-cpp/include/spine/EventTimeline.h
  63. 97 0
      spine-cpp/spine-cpp/include/spine/Extension.h
  64. 300 0
      spine-cpp/spine-cpp/include/spine/HashMap.h
  65. 90 0
      spine-cpp/spine-cpp/include/spine/IkConstraint.h
  66. 81 0
      spine-cpp/spine-cpp/include/spine/IkConstraintData.h
  67. 64 0
      spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h
  68. 110 0
      spine-cpp/spine-cpp/include/spine/Json.h
  69. 54 0
      spine-cpp/spine-cpp/include/spine/LinkedMesh.h
  70. 106 0
      spine-cpp/spine-cpp/include/spine/MathUtil.h
  71. 155 0
      spine-cpp/spine-cpp/include/spine/MeshAttachment.h
  72. 44 0
      spine-cpp/spine-cpp/include/spine/MixDirection.h
  73. 49 0
      spine-cpp/spine-cpp/include/spine/MixPose.h
  74. 61 0
      spine-cpp/spine-cpp/include/spine/PathAttachment.h
  75. 110 0
      spine-cpp/spine-cpp/include/spine/PathConstraint.h
  76. 105 0
      spine-cpp/spine-cpp/include/spine/PathConstraintData.h
  77. 64 0
      spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h
  78. 64 0
      spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h
  79. 52 0
      spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h
  80. 73 0
      spine-cpp/spine-cpp/include/spine/PointAttachment.h
  81. 77 0
      spine-cpp/spine-cpp/include/spine/Pool.h
  82. 41 0
      spine-cpp/spine-cpp/include/spine/PositionMode.h
  83. 73 0
      spine-cpp/spine-cpp/include/spine/RTTI.h
  84. 141 0
      spine-cpp/spine-cpp/include/spine/RegionAttachment.h
  85. 42 0
      spine-cpp/spine-cpp/include/spine/RotateMode.h
  86. 72 0
      spine-cpp/spine-cpp/include/spine/RotateTimeline.h
  87. 52 0
      spine-cpp/spine-cpp/include/spine/ScaleTimeline.h
  88. 52 0
      spine-cpp/spine-cpp/include/spine/ShearTimeline.h
  89. 207 0
      spine-cpp/spine-cpp/include/spine/Skeleton.h
  90. 127 0
      spine-cpp/spine-cpp/include/spine/SkeletonBinary.h
  91. 108 0
      spine-cpp/spine-cpp/include/spine/SkeletonBounds.h
  92. 78 0
      spine-cpp/spine-cpp/include/spine/SkeletonClipping.h
  93. 162 0
      spine-cpp/spine-cpp/include/spine/SkeletonData.h
  94. 79 0
      spine-cpp/spine-cpp/include/spine/SkeletonJson.h
  95. 94 0
      spine-cpp/spine-cpp/include/spine/Skin.h
  96. 115 0
      spine-cpp/spine-cpp/include/spine/Slot.h
  97. 106 0
      spine-cpp/spine-cpp/include/spine/SlotData.h
  98. 42 0
      spine-cpp/spine-cpp/include/spine/SpacingMode.h
  99. 51 0
      spine-cpp/spine-cpp/include/spine/TextureLoader.h
  100. 68 0
      spine-cpp/spine-cpp/include/spine/Timeline.h

+ 9 - 0
spine-cpp/CMakeLists.txt

@@ -0,0 +1,9 @@
+include_directories(include)
+file(GLOB INCLUDES "spine-cpp/include/**/*.h")
+file(GLOB SOURCES "spine-cpp/src/**/*.cpp")
+
+set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -Wall -std=c++03 -pedantic -fno-exceptions -fno-rtti")
+add_library(spine-cpp STATIC ${SOURCES} ${INCLUDES})
+target_include_directories(spine-cpp PUBLIC spine-cpp/include)
+install(TARGETS spine-cpp DESTINATION dist/lib)
+install(FILES ${INCLUDES} DESTINATION dist/include)

+ 27 - 0
spine-cpp/LICENSE

@@ -0,0 +1,27 @@
+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.

+ 39 - 0
spine-cpp/README.md

@@ -0,0 +1,39 @@
+# 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.
+
+## 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.
+
+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-cpp works with data exported from Spine 3.6.xx.
+
+spine-cpp supports all Spine features.
+
+## 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.
+2. Create a new project and import the source.
+
+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
+
+Extending spine-cpp requires implementing both the SpineExtension class (which has a handy default instance) and the TextureLoader class:
+
+Spine::SpineExtension::setInstance(Spine::DefaultSpineExtension::getInstance());
+
+class MyTextureLoader : public TextureLoader
+{
+  virtual void load(AtlasPage& page, std::string path) { // TODO }
+
+  virtual void unload(void* texture) { // TODO }
+};
+
+## Runtimes extending spine-cpp
+
+- Coming Soon!

+ 58 - 0
spine-cpp/spine-cpp-unit-tests/CMakeLists.txt

@@ -0,0 +1,58 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(spine_unit_test)
+
+set(CMAKE_INSTALL_PREFIX "./")
+set(CMAKE_VERBOSE_MAKEFILE ON)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -DKANJI_MEMTRACE -DUSE_CPP11_MUTEX -std=c++11")
+
+#########################################################
+# set includes
+#########################################################
+include_directories(../spine-cpp/include teamcity minicppunit tests memory)
+
+#########################################################
+# Add Sources
+#########################################################
+set(MINICPP_SRC
+	minicppunit/MiniCppUnit.cxx
+)
+
+set(TEAMCITY_SRC
+	teamcity/teamcity_cppunit.cpp
+	teamcity/teamcity_messages.cpp
+)
+
+set(TEST_SRC
+	tests/SpineEventMonitor.cpp
+	tests/EmptyTestFixture.cpp
+	tests/C_InterfaceTestFixture.cpp
+	tests/CPP_InterfaceTestFixture.cpp
+	tests/MemoryTestFixture.cpp
+)
+
+set(MEMLEAK_SRC
+	memory/KMemory.cpp
+	memory/KString.cpp
+)
+
+#########################################################
+# setup main project
+#########################################################
+add_executable(spine_unit_test main.cpp ${MINICPP_SRC} ${TEAMCITY_SRC} ${TEST_SRC} ${MEMLEAK_SRC})
+target_link_libraries(spine_unit_test spine-cpp)
+
+
+#########################################################
+# copy resources to build output directory
+#########################################################
+add_custom_command(TARGET spine_unit_test PRE_BUILD
+		COMMAND ${CMAKE_COMMAND} -E copy_directory
+		${CMAKE_CURRENT_LIST_DIR}/../../examples/spineboy/export $<TARGET_FILE_DIR:spine_unit_test>/testdata/spineboy)
+
+add_custom_command(TARGET spine_unit_test PRE_BUILD
+		COMMAND ${CMAKE_COMMAND} -E copy_directory
+		${CMAKE_CURRENT_LIST_DIR}/../../examples/raptor/export $<TARGET_FILE_DIR:spine_unit_test>/testdata/raptor)
+
+add_custom_command(TARGET spine_unit_test PRE_BUILD
+		COMMAND ${CMAKE_COMMAND} -E copy_directory
+		${CMAKE_CURRENT_LIST_DIR}/../../examples/goblins/export $<TARGET_FILE_DIR:spine_unit_test>/testdata/goblins)

+ 67 - 0
spine-cpp/spine-cpp-unit-tests/README.md

@@ -0,0 +1,67 @@
+# 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.
+
+## 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.
+
+Tests are sorted into Suites, Fixtures and Cases.  There is one suite, it contains many fixtures and each fixture contains test cases.  To turn off a fixture, edit "TestOptions.h".  To turn off specific test cases, comment out the TEST_CASE() line in the fixture's header.
+
+## Memory Leak Detection
+This project includes a very minimal memory leak detector.  It is based roughly on the leak detector in the [Popcap Framework](https://sourceforge.net/projects/popcapframework/?source=directory), but has been modified over the years.
+
+## Continuous Integration
+The test runner includes the ability to format output messages to signal a CI server.  An example interface for [Teamcity](https://www.jetbrains.com/teamcity/) is included.  To implement for another server, determine the wireformat for the messages and duplicate/edit the teamcity_messages class. [Teamcity Wire Format](https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity)
+
+### Trigger
+Your CI server should trigger on VCS check-in.
+
+### CMake Build Step
+The first build step for the CI server should be to run CMake on the 'spine-cpp-unit-tests' folder.  Follow the usage directions below.
+
+### Compile Build Step
+This build step should not execute if the previous step did not successfully complete.
+Depending on the test agent build environment, you should build the output solution or project from the cmake step.  Debug is fine.
+
+### Test Runner Build Step
+This build step should not execute if the previous step did not successfully complete.
+Again, depending on the test agent build environment, you should have produced an executable.  Run this executable. 
+
+
+## Usage
+Make sure [CMake](https://cmake.org/download/) is installed.
+
+Create a 'build' directory in the 'spine-cpp-unit-tests' folder.  Then switch to that folder and execute cmake:
+
+mkdir build
+cd build
+cmake ..
+
+### Win32 build
+msbuild spine_unit_test.sln /t:spine_unit_test /p:Configuration="Debug" /p:Platform="Win32"
+
+
+## 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.
+
+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
+second "walk": 0d0
+
+queue interrupt for original walk
+queue start for second walk
+drain interrupt and start
+
+0d0 is interrupted
+0d0 is ended
+
+"run": 0c0
+ 0d0 is interrupted
+ second walk becomes mixingFrom of run
+ 0c0 is started
+
+ queue is drained
+
+ first walk: 6f0
+ second walk: 9c0

+ 110 - 0
spine-cpp/spine-cpp-unit-tests/main.cpp

@@ -0,0 +1,110 @@
+// SexyKanjiTestSuite.cpp : Defines the entry point for the console application.
+//
+
+#include "MiniCppUnit.hxx"
+
+#ifdef WIN32
+#include <direct.h>
+#else
+#include <unistd.h>
+#endif // WIN32
+
+#include <ctime>
+#include "KString.h"
+#include <stdio.h>
+
+#include "spine/Extension.h"
+
+#include "KMemory.h" // last include
+
+using namespace Spine;
+
+class KanjiSpineExtension : public DefaultSpineExtension
+{
+public:
+    static KanjiSpineExtension* getInstance();
+    
+    virtual ~KanjiSpineExtension();
+    
+    virtual void* spineAlloc(size_t size, const char* file, int line);
+    
+    virtual void* spineCalloc(size_t num, size_t size, const char* file, int line);
+    
+    virtual void* spineRealloc(void* ptr, size_t size, const char* file, int line);
+    
+    virtual void spineFree(void* mem);
+    
+protected:
+    KanjiSpineExtension();
+};
+
+KanjiSpineExtension* KanjiSpineExtension::getInstance()
+{
+    static KanjiSpineExtension ret;
+    return &ret;
+}
+
+KanjiSpineExtension::~KanjiSpineExtension()
+{
+    // Empty
+}
+
+void* KanjiSpineExtension::spineAlloc(size_t size, const char* file, int line)
+{
+    return _kanjimalloc(size);
+}
+
+void* KanjiSpineExtension::spineCalloc(size_t num, size_t size, const char* file, int line)
+{
+    void* ptr = _kanjimalloc(num * size, file, line);
+    if (ptr)
+    {
+        memset(ptr, 0, num * size);
+    }
+    
+    return ptr;
+}
+
+void* KanjiSpineExtension::spineRealloc(void* ptr, size_t size, const char* file, int line)
+{
+    return _kanjirealloc(ptr, size);
+}
+
+void KanjiSpineExtension::spineFree(void* mem)
+{
+    _kanjifree(mem);
+}
+
+KanjiSpineExtension::KanjiSpineExtension() : DefaultSpineExtension()
+{
+    // Empty
+}
+
+int main(int argc, char* argv[])
+{
+	SpineExtension::setInstance(KanjiSpineExtension::getInstance());
+
+	// Start Timing
+	time_t start_time, end_time;
+	time(&start_time);
+
+	/* Set working directory to current location for opening test data */
+#ifdef WIN32
+	_chdir( GetFileDir(argv[0], false).c_str() );
+#else
+	chdir(GetFileDir(argv[0], false).c_str());
+#endif
+
+	// Run Test Suite
+	if(JetBrains::underTeamcity()) gTeamCityListener.startSuite("Spine-CPP Test Suite");
+	int ret_val = TestFixtureFactory::theInstance().runTests() ? 0 : -1;
+	if(JetBrains::underTeamcity()) gTeamCityListener.endSuite("Spine-CPP Test Suite");
+
+	// End Timing
+	time(&end_time);
+	double secs = difftime(end_time,start_time);
+	printf("\n\n%i minutes and %i seconds of your life taken from you by these tests.\n", ((int)secs) / 60, ((int)secs) % 60);
+
+	return ret_val;
+}
+

+ 303 - 0
spine-cpp/spine-cpp-unit-tests/memory/KMemory.cpp

@@ -0,0 +1,303 @@
+#include <list>
+#include <map>
+#include <stdarg.h>
+#include <string>
+#include <time.h>
+
+#include "KString.h"
+
+#include "KMemory.h" // last include
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//	KANJI_DUMP_LEAKED_MEM will print out the memory block that was leaked.
+//	This is helpful when leaked objects have string identifiers.
+//
+///////////////////////////////////////////////////////////////////////////////
+//#define KANJI_DUMP_LEAKED_MEM
+
+
+///////////////////////////////////////////////////////////////////////////////
+//
+//	KANJI_TRACK_MEM_USAGE will print out all memory allocations.
+//
+///////////////////////////////////////////////////////////////////////////////
+//#define KANJI_TRACK_MEM_USAGE
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// Our memory system is thread-safe, but instead of linking massive libraries,
+// we attempt to use C++11 std::mutex.
+#ifdef USE_CPP11_MUTEX_DISABLED
+#include <mutex>
+typedef std::recursive_mutex KSysLock; // rentrant
+struct KAutoLock {
+	KAutoLock(KSysLock& lock) :mLock(lock) { mLock.lock(); }	// acquire 
+	~KAutoLock() { mLock.unlock(); }							// release
+
+	KSysLock& mLock;
+};
+#else // Fallback to unsafe.  don't spawn threads
+typedef int KSysLock;
+struct KAutoLock {
+	KAutoLock(KSysLock) {}	// acquire 
+	~KAutoLock() {}			// release
+};
+#endif
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+struct KANJI_ALLOC_INFO
+{
+    size_t  size;
+    std::string file;
+    int     line;
+};
+static bool showLeaks = false;
+class KAllocMap : public std::map<void*, KANJI_ALLOC_INFO>
+{
+public:
+    KSysLock crit;
+    static bool allocMapValid;
+
+public:
+    KAllocMap() { allocMapValid = true; }
+    ~KAllocMap()
+    {
+        if (showLeaks)
+            KMemoryDumpUnfreed();
+
+        allocMapValid = false;
+    }
+};
+bool KAllocMap::allocMapValid = false;
+static KAllocMap allocMap; // once this static object destructs, it dumps unfreed memory
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+#ifdef KANJI_TRACK_MEM_USAGE
+void KMemoryDumpUsage(); // forward declaration
+class KAllocStat
+{
+public:
+    typedef std::map<int, int> allocCount; // [size] = count
+    typedef std::map<std::pair<std::string, int>, allocCount> allocInfo; // [file, line] = allocCount
+
+    allocInfo memInfo;
+    static bool allocMapValid;
+
+public:
+
+    KAllocStat()
+    {
+        allocMapValid = true;
+    }
+    ~KAllocStat()
+    {
+        if (showLeaks)
+            KMemoryDumpUsage();
+
+        allocMapValid = false;
+    }
+    void addTrack(const char* fname, int lnum, int asize)
+    {
+        allocCount& info = memInfo[std::pair<std::string, int>(fname, lnum)];
+        info[asize]++;
+    }
+};
+bool KAllocStat::allocMapValid = false;
+static KAllocStat allocStat;
+#endif // KANJI_TRACK_MEM_USAGE
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+extern void KMemoryAddTrack( void* addr, size_t asize, const char* fname, int lnum )
+{
+    if (!KAllocMap::allocMapValid || asize == 0)
+        return;
+
+    KAutoLock aCrit(allocMap.crit);
+    showLeaks = true;
+
+    KANJI_ALLOC_INFO& info = allocMap[addr];
+    info.file = fname;
+    info.line = lnum;
+    info.size = asize;
+
+#ifdef KANJI_TRACK_MEM_USAGE
+    if (KAllocStat::allocMapValid)
+        allocStat.addTrack(fname, lnum, asize);
+#endif
+};
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+void KMemoryRemoveTrack(void* addr)
+{
+    if (!KAllocMap::allocMapValid)
+        return;
+
+    KAutoLock aCrit(allocMap.crit);
+    KAllocMap::iterator anItr = allocMap.find(addr);
+    if (anItr != allocMap.end())
+        allocMap.erase(anItr);
+};
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+void KMemoryDumpUnfreed()
+{
+    if (!KAllocMap::allocMapValid)
+        return;
+
+    KAutoLock aCrit(allocMap.crit); // prevent modification of the map while iterating
+
+    size_t totalSize = 0;
+    char buf[8192];
+
+    FILE* f = fopen("mem_leaks.txt", "wt");
+    if (!f)
+        return;
+
+    time_t aTime = time(NULL);
+    sprintf(buf, "Memory Leak Report for %s\n", asctime(localtime(&aTime)));
+    fprintf(f, "%s", buf);
+    KOutputDebug(DEBUGLVL, "\n");
+    KOutputDebug(INFOLVL, buf);
+    for(KAllocMap::iterator i = allocMap.begin(); i != allocMap.end(); ++i)
+    {
+        sprintf(buf, "%s(%d) : Leak %u byte%s @0x%08X\n", i->second.file.c_str(), i->second.line, i->second.size, i->second.size > 1 ? "s" : "", (size_t)i->first);
+        KOutputDebug(ERRORLVL, buf);
+        fprintf(f, "%s", buf);
+
+#ifdef KANJI_DUMP_LEAKED_MEM
+        unsigned char* data = (unsigned char*)i->first;
+        int count = 0;
+        char hex_dump[1024];
+        char ascii_dump[1024];
+
+        for (int index = 0; index < i->second.size; index++)
+        {
+            unsigned char _c = *data;
+
+            if (count == 0)
+                sprintf(hex_dump, "\t%02X ", _c);
+            else
+                sprintf(hex_dump, "%s%02X ", hex_dump, _c); // technically, this is undefined behavior
+
+            if ((_c < 32) || (_c > 126))
+                _c = '.';
+
+            if (count == 7)
+                sprintf(ascii_dump, "%s%c ", ascii_dump, _c);
+            else
+                sprintf(ascii_dump, "%s%c", count == 0 ? "\t" : ascii_dump, _c); // technically, this is undefined behavior
+
+
+            if (++count == 16)
+            {
+                count = 0;
+                sprintf(buf, "%s\t%s\n", hex_dump, ascii_dump);
+                fprintf(f, buf);
+
+                memset((void*)hex_dump, 0, 1024);
+                memset((void*)ascii_dump, 0, 1024);
+            }
+
+            data++;
+        }
+
+        if (count != 0)
+        {
+            fprintf(f, hex_dump);
+            for (int index = 0; index < 16 - count; index++)
+                fprintf(f, "\t");
+
+            fprintf(f, ascii_dump);
+
+            for (int index = 0; index < 16 - count; index++)
+                fprintf(f, ".");
+        }
+
+        count = 0;
+        fprintf(f, "\n\n");
+        memset((void*)hex_dump, 0, 1024);
+        memset((void*)ascii_dump, 0, 1024);
+
+#endif // KANJI_DUMP_LEAKED_MEM
+
+        totalSize += i->second.size;
+    }
+
+	ErrorLevel lvl = (totalSize > 0) ? ERRORLVL : INFOLVL;
+
+    sprintf(buf, "-----------------------------------------------------------\n");
+    fprintf(f, "%s", buf);
+    KOutputDebug(lvl, buf);
+    sprintf(buf, "Total Unfreed: %u bytes (%luKB)\n\n", totalSize, totalSize / 1024);
+    KOutputDebug(lvl, buf);
+    fprintf(f, "%s", buf);
+    fclose(f);
+}
+
+#ifdef KANJI_TRACK_MEM_USAGE
+void KMemoryDumpUsage()
+{
+    if (!KAllocStat::allocMapValid)
+        return;
+
+    char buf[8192];
+    FILE* f = fopen("mem_usage.txt", "wt");
+
+    time_t aTime = time(NULL);
+    sprintf(buf, "Memory Usage Report for %s\n", asctime(localtime(&aTime)));
+    if (f) fprintf(f, "%s", buf);
+    KOutputDebug("\n");
+    KOutputDebug(buf);
+
+    for(KAllocStat::allocInfo::iterator i = allocStat.memInfo.begin(); i != allocStat.memInfo.end(); ++i)
+    {
+        int aBytesTotal = 0;
+        int aCallsTotal = 0;
+        for (KAllocStat::allocCount::iterator index = i->second.begin(); index != i->second.end(); ++index)
+        {
+            aBytesTotal += index->first;
+            aCallsTotal += index->second;
+            sprintf(buf, "%s(%d) : %d bytes (%d %s)\n", i->first.first.c_str(), i->first.second, index->first, index->second, index->second == 1 ? "call" : "calls");
+            if (f) fprintf(f, "%s", buf);
+            KOutputDebug(buf);
+        }
+
+        if (i->second.size() > 1)
+        {
+            sprintf(buf, "    %s(%d) : %d KB total (%d calls)\n", i->first.first.c_str(), i->first.second, aBytesTotal / 1024, aCallsTotal);
+            if (f) fprintf(f, "%s", buf);
+            KOutputDebug(buf);
+        }
+    }
+    if (f) fclose(f);
+}
+#endif // KANJI_TRACK_MEM_USAGE
+
+size_t KMemoryAllocated()
+{
+    if (!KAllocMap::allocMapValid)
+        return 0;
+
+    KAutoLock aCrit(allocMap.crit);
+
+    size_t size = 0;
+    for(auto i = allocMap.begin(); i != allocMap.end(); ++i)
+    {
+        KANJI_ALLOC_INFO& info = i->second;
+        size += info.size;
+    }
+    return size;
+}

+ 189 - 0
spine-cpp/spine-cpp-unit-tests/memory/KMemory.h

@@ -0,0 +1,189 @@
+#ifndef __KANJIMEMORY_H__
+#define __KANJIMEMORY_H__
+
+#include <stdlib.h>
+#include <stdint.h>
+
+#if defined(_DEBUG) && !defined(KANJI_MEMTRACE)
+#define KANJI_MEMTRACE
+#endif
+
+#ifdef WIN32
+#pragma warning(disable : 4595)
+#endif
+
+//////////////////////////////////////////////////////////////////////////
+//                      HOW TO USE THIS FILE
+//
+//          In the desired .CPP file (NOT header file), AFTER ALL of your
+//  #include declarations, do a #include "KMemory.h" or whatever you renamed
+//  this file to. It's very important that you do it only in the .cpp and
+//  after every other include file, otherwise it won't compile.  The memory leaks
+//  will appear in a file called mem_leaks.txt and they will also be printed out
+//  in the output window when the program exits.
+//
+//////////////////////////////////////////////////////////////////////////
+
+#ifndef SAFE_DELETE
+#define SAFE_DELETE(pPtr) { if(pPtr) delete pPtr; pPtr = 0; }
+#endif
+
+#ifndef SCOPED_AUTO_SAFE_DELETE
+template <typename T>
+class ScopedAutoDeletePointerHelper
+{
+public:
+    ScopedAutoDeletePointerHelper(T pPtr) : _pPtr(pPtr) {}
+    ~ScopedAutoDeletePointerHelper() { SAFE_DELETE(_pPtr); }
+
+    T _pPtr;
+};
+#define SCOPED_AUTO_SAFE_DELETE(p) ScopedAutoDeletePointerHelper<decltype(p)> anAutoDelete##p(p);
+#endif
+
+#ifndef SAFE_DELETE_ARRAY
+#define SAFE_DELETE_ARRAY(pPtr) { if(pPtr) delete [] pPtr; pPtr = 0; }
+#endif
+
+extern void KMemoryDumpUnfreed();
+extern size_t KMemoryAllocated();
+
+#ifdef WIN32
+#define KMEM_CALLTYPE __cdecl
+#else
+#define KMEM_CALLTYPE
+#endif
+
+#ifdef __APPLE__
+#define KMEM_THROWSPEC throw(std::bad_alloc)
+#define KMEM_THROWS_BADALLOC
+#include <new>
+#else
+#define KMEM_THROWSPEC
+#endif
+
+#if defined(KANJI_MEMTRACE)
+
+/////////////////////////////////////////////
+// DO NOT CALL THESE TWO METHODS DIRECTLY  //
+/////////////////////////////////////////////
+
+extern void KMemoryAddTrack(void* addr, size_t asize, const char* fname, int lnum);
+extern void KMemoryRemoveTrack(void* addr);
+
+//Replacement for the standard malloc/free, records size of allocation and the file/line number it was on
+inline void* _kanjimalloc (size_t size, const char* file, int line)
+{
+    void* ptr = (void*)malloc(size);
+    KMemoryAddTrack(ptr, size, file, line);
+    return(ptr);
+}
+
+inline void* _kanjimalloc (size_t size)
+{
+    return _kanjimalloc(size, "", 0);
+}
+
+inline void _kanjifree (void* ptr)
+{
+    KMemoryRemoveTrack(ptr);
+    free(ptr);
+}
+
+inline void* _kanjirealloc (void* ptr, size_t size, const char* file, int line)
+{
+    void* ptr2 = (void*)realloc(ptr, size);
+    if (ptr2)
+    {
+        KMemoryRemoveTrack(ptr);
+        KMemoryAddTrack(ptr2, size, file, line);
+    }
+    return ptr2;
+}
+
+inline void* _kanjirealloc (void* ptr, size_t size)
+{
+    return _kanjirealloc(ptr, size, "", 0);
+}
+
+#define kanjimalloc(size) _kanjimalloc((size), __FILE__, __LINE__)
+#define kanjifree _kanjifree
+#define kanjirealloc(ptr, size) _kanjirealloc(ptr, size, __FILE__, __LINE__)
+
+//Replacement for the standard "new" operator, records size of allocation and the file/line number it was on
+inline void* KMEM_CALLTYPE operator new(size_t size, const char* file, int line)
+{
+    void* ptr = (void*)malloc(size);
+    KMemoryAddTrack(ptr, size, file, line);
+    return(ptr);
+}
+
+//Same as above, but for arrays
+inline void* KMEM_CALLTYPE operator new[](size_t size, const char* file, int line)
+{
+    void* ptr = (void*)malloc(size);
+    KMemoryAddTrack(ptr, size, file, line);
+    return(ptr);
+}
+
+
+// These single argument new operators allow vc6 apps to compile without errors
+inline void* KMEM_CALLTYPE operator new(size_t size) KMEM_THROWSPEC
+{
+    void* ptr = (void*)malloc(size);
+#ifdef KMEM_THROWS_BADALLOC
+    if(!ptr) throw std::bad_alloc();
+#endif
+    return(ptr);
+}
+
+inline void* KMEM_CALLTYPE operator new[](size_t size) KMEM_THROWSPEC
+{
+    void* ptr = (void*)malloc(size);
+#ifdef KMEM_THROWS_BADALLOC
+    if(!ptr) throw std::bad_alloc();
+#endif // KMEM_THROWS_BADALLOC
+    return(ptr);
+}
+
+
+//custom delete operators
+inline void KMEM_CALLTYPE operator delete(void* p) throw()
+{
+    KMemoryRemoveTrack(p);
+    free(p);
+}
+
+inline void KMEM_CALLTYPE operator delete[](void* p) throw()
+{
+    KMemoryRemoveTrack(p);
+    free(p);
+}
+
+//needed in case in the constructor of the class we're newing, it throws an exception
+inline void KMEM_CALLTYPE operator delete(void* pMem, const char* file, int line)
+{
+    free(pMem);
+}
+
+inline void KMEM_CALLTYPE operator delete[](void* pMem, const char* file, int line)
+{
+    free(pMem);
+}
+
+#define KDEBUG_NEW new(__FILE__, __LINE__)
+#define new KDEBUG_NEW
+
+#else // KANJI_MEMTRACE NOT DEFINED
+
+#define kanjimalloc malloc
+#define kanjifree free
+#define kanjirealloc realloc
+
+inline void* _kanjimalloc(size_t size) { return malloc(size); }
+inline void  _kanjifree(void* ptr) { free(ptr); }
+inline void* _kanjirealloc(void* ptr, size_t size) { return realloc(ptr, size); }
+
+#endif // KANJI_MEMTRACE
+
+#endif // __KANJIMEMORY_H__

+ 185 - 0
spine-cpp/spine-cpp-unit-tests/memory/KString.cpp

@@ -0,0 +1,185 @@
+#include "KString.h" 
+#include <stdarg.h>
+
+#include "MiniCppUnit.hxx"
+
+///////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+// String Helper 
+
+static std::string vasprintf(const char* fmt, va_list argv)
+{
+	std::string result;
+	va_list argv_copy; // vsnprintf modifies argv, need copy
+#ifndef va_copy
+	argv_copy = argv;
+#else
+	va_copy(argv_copy, argv);
+#endif
+
+	int len = vsnprintf(NULL, 0, fmt, argv_copy);
+	if (len > 0 && len < 255)
+	{
+		// cover 90% of all calls
+		char str[256] = { 0 };
+		int len2 = vsnprintf(str, 255, fmt, argv);
+		result = str;
+	}
+	else if (len > 0)
+	{
+		char* str = static_cast<char*>(alloca(len + 1)); // alloca on stack, space for null-termination
+		int len2 = vsnprintf(str, len + 1, fmt, argv);
+		result = str;
+	}
+	return result;
+}
+
+
+static void reportWarning(const std::string& warnStr)
+{
+	if (JetBrains::underTeamcity())
+		gTeamCityListener.messages.messageWarning(warnStr);
+	else
+		fprintf(stderr, "%s", warnStr.c_str());
+}
+
+static void reportError(const std::string& errorStr)
+{
+	if (JetBrains::underTeamcity())
+		gTeamCityListener.messages.messageError(errorStr);
+	else
+		fprintf(stderr, "%s", errorStr.c_str());
+}
+
+static void reportInfo(const std::string& infoStr)
+{
+	if (JetBrains::underTeamcity())
+		gTeamCityListener.messages.messageNormal(infoStr);
+	else
+		fprintf(stderr, "%s", infoStr.c_str());
+}
+
+static void reportDebug(const std::string& debugStr)
+{
+	fprintf(stderr, "%s", debugStr.c_str());
+}
+
+static void report(ErrorLevel level, const std::string& Str)
+{
+	switch (level) {
+	case WARNLVL: reportWarning(Str); break;
+	case ERRORLVL: reportError(Str); break;
+	case INFOLVL: reportInfo(Str); break;
+	case DEBUGLVL: reportDebug(Str); break;
+	}
+}
+
+void KOutputDebug(ErrorLevel lvl, const char* fmt ...)
+{
+	va_list argList;
+	va_start(argList, fmt);
+	std::string str = vasprintf(fmt, argList);
+	va_end(argList);
+
+	report(lvl, str);
+}
+
+#define K_MAX(a,b) ((a>b) ? a : b)
+
+std::string GetFileName(const std::string& thePath, bool noExtension)
+{
+	int aLastSlash = K_MAX((int)thePath.rfind('\\'), (int)thePath.rfind('/'));
+
+	if (noExtension)
+	{
+		int aLastDot = (int)thePath.rfind('.');
+		if (aLastDot > aLastSlash)
+			return thePath.substr(aLastSlash + 1, aLastDot - aLastSlash - 1);
+	}
+
+	if (aLastSlash == -1)
+		return thePath;
+	else
+		return thePath.substr(aLastSlash + 1);
+}
+
+std::string GetFileDir(const std::string& thePath, bool withSlash)
+{
+	int aLastSlash = K_MAX((int)thePath.rfind(('\\')), (int)thePath.rfind(('/')));
+
+	if (aLastSlash == -1)
+		return ("");
+	else
+	{
+		if (withSlash)
+			return thePath.substr(0, aLastSlash + 1);
+		else
+			return thePath.substr(0, aLastSlash);
+	}
+}
+
+std::string GetFileExt(const std::string& thePath)
+{
+	std::string::size_type idx = thePath.find_last_of('.');
+
+	if (idx != std::string::npos)
+		return thePath.substr(idx + 1);
+
+	return ("");
+}
+
+/**
+ * g_ascii_strcasecmp:
+ * @s1: string to compare with @s2.
+ * @s2: string to compare with @s1.
+ *
+ * Compare two strings, ignoring the case of ASCII characters.
+ *
+ * Unlike the BSD strcasecmp() function, this only recognizes standard
+ * ASCII letters and ignores the locale, treating all non-ASCII
+ * bytes as if they are not letters.
+ *
+ * This function should be used only on strings that are known to be
+ * in encodings where the bytes corresponding to ASCII letters always
+ * represent themselves. This includes UTF-8 and the ISO-8859-*
+ * charsets, but not for instance double-byte encodings like the
+ * Windows Codepage 932, where the trailing bytes of double-byte
+ * characters include all ASCII letters. If you compare two CP932
+ * strings using this function, you will get false matches.
+ *
+ * Return value: an integer less than, equal to, or greater than
+ *               zero if @s1 is found, respectively, to be less than,
+ *               to match, or to be greater than @s2.
+ **/
+static int g_ascii_compare_caseless(const char* s1, const char* s2)
+{
+#define TOUPPER(c)  (((c) >= 'a' && (c) <= 'z') ? (c) - 'a' + 'A' : (c))
+#define TOLOWER(c)  (((c) >= 'A' && (c) <= 'Z') ? (c) - 'A' + 'a' : (c))
+#define g_return_val_if_fail(expr,val) { if (!(expr)) return (val); }
+
+	int c1, c2;
+
+	g_return_val_if_fail(s1 != NULL, 0);
+	g_return_val_if_fail(s2 != NULL, 0);
+
+	while (*s1 && *s2)
+	{
+		c1 = (int)(unsigned char)TOLOWER(*s1);
+		c2 = (int)(unsigned char)TOLOWER(*s2);
+		if (c1 != c2)
+			return (c1 - c2);
+		s1++; s2++;
+	}
+
+	return (((int)(unsigned char)* s1) - ((int)(unsigned char)* s2));
+
+#undef g_return_val_if_fail
+#undef TOUPPER
+#undef TOLOWER
+}
+
+
+int CompareNoCase(const std::string & str1, const std::string & str2)
+{
+	return g_ascii_compare_caseless(str1.c_str(), str2.c_str());
+}

+ 19 - 0
spine-cpp/spine-cpp-unit-tests/memory/KString.h

@@ -0,0 +1,19 @@
+#pragma once 
+
+#include <string>
+
+// Error reporting with levels similar to Android and are automatically forwarded to Continuous integration server
+enum ErrorLevel {
+	WARNLVL,
+	ERRORLVL,
+	INFOLVL,
+	DEBUGLVL
+};
+
+extern void KOutputDebug(ErrorLevel lvl, const char* fmt ...);
+
+extern std::string GetFileName(const std::string& thePath, bool noExtension);
+extern std::string GetFileDir(const std::string& thePath, bool withSlash);
+extern std::string GetFileExt(const std::string& thePath);
+
+extern int CompareNoCase(const std::string& str1, const std::string& str2);

+ 279 - 0
spine-cpp/spine-cpp-unit-tests/minicppunit/MiniCppUnit.cxx

@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 2003-2004  Pau Arumí & David García
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include "MiniCppUnit.hxx"
+
+JetBrains::TeamcityProgressListener gTeamCityListener;
+bool gUseTeamCity = false;
+
+#include <cmath>
+#include <string>
+#include <sstream>
+
+#define MIN(a,b) ((a < b) ? a : b)
+#define MAX(a,b) ((a > b) ? a : b)
+
+TestsListener::TestsListener() : _currentTestName(0)
+{
+	_executed=_failed=_exceptions=0;
+	gUseTeamCity = JetBrains::underTeamcity();
+}
+
+TestsListener& TestsListener::theInstance()
+{
+	static TestsListener instancia;
+	return instancia;
+}
+
+std::stringstream& TestsListener::errorsLog()
+{
+	if (_currentTestName)
+	{
+		_log << "\n" << errmsgTag_nameOfTest() << (*_currentTestName) << "\n";
+	}
+	return _log;
+}
+
+std::string TestsListener::logString()
+{
+	std::string aRetornar = _log.str();
+	_log.str("");
+	return aRetornar;
+}
+void TestsListener::currentTestName( std::string& name)
+{
+	_currentTestName = &name;
+
+	if(gUseTeamCity)gTeamCityListener.startTest(name);
+}
+void TestsListener::testHasRun() // started
+{
+	std::cout << ".";
+	theInstance()._executed++;
+}
+
+void TestsListener::testHasPassed() // finished without errors
+{
+	if(gUseTeamCity)
+		gTeamCityListener.endTest(*(theInstance()._currentTestName));
+}
+
+void TestsListener::testHasFailed(const char* reason, const char* file, int line)
+{
+	if(gUseTeamCity)
+	{
+		gTeamCityListener.addFailure(JetBrains::TestFailure(*(theInstance()._currentTestName), "", JetBrains::SourceLine(file, line), reason));
+		gTeamCityListener.endTest(*(theInstance()._currentTestName));
+	}
+
+	std::cout << "F";
+	theInstance()._failed++;
+	throw TestFailedException();
+}
+void TestsListener::testHasThrown()
+{
+	if(gUseTeamCity)
+	{
+		gTeamCityListener.addFailure(JetBrains::TestFailure(*(theInstance()._currentTestName), "", JetBrains::SourceLine(), "Exception"));
+		gTeamCityListener.endTest(*(theInstance()._currentTestName));
+	}
+	std::cout << "E";
+	theInstance()._exceptions++;
+}
+std::string TestsListener::summary()
+{
+	std::ostringstream os;
+	os	<< "\nSummary:\n"
+		<< Assert::bold() << "\tExecuted Tests:         " 
+		<< _executed << Assert::normal() << std::endl
+		<< Assert::green() << "\tPassed Tests:           " 
+		<< (_executed-_failed-_exceptions) 
+		<< Assert::normal() << std::endl;
+	if (_failed > 0)
+	{
+		os 	<< Assert::red() << "\tFailed Tests:           " 
+			<< _failed << Assert::normal() << std::endl;
+	}
+	if (_exceptions > 0)
+	{
+		os 	<< Assert::yellow() << "\tUnexpected exceptions:  " 
+			<< _exceptions << Assert::normal() << std::endl;
+	}
+	os << std::endl;
+	return os.str();
+}
+bool TestsListener::allTestsPassed()
+{
+	return !theInstance()._exceptions && !theInstance()._failed;
+}
+
+
+
+void Assert::assertTrue(char* strExpression, bool expression,
+		const char* file, int linia)
+{
+	if (!expression)
+	{
+		TestsListener::theInstance().errorsLog() << "\n"
+			<< errmsgTag_testFailedIn() << file 
+			<< errmsgTag_inLine() << linia << "\n" 
+			<< errmsgTag_failedExpression() 
+			<< bold() << strExpression << normal() << "\n";
+		TestsListener::theInstance().testHasFailed(strExpression, file, linia);
+	}
+}
+
+void Assert::assertTrueMissatge(char* strExpression, bool expression, 
+		const char* missatge, const char* file, int linia)
+{
+	if (!expression)
+	{
+		TestsListener::theInstance().errorsLog() << "\n"
+			<< errmsgTag_testFailedIn() << file
+			<< errmsgTag_inLine() << linia << "\n" 
+			<< errmsgTag_failedExpression() 
+			<< bold() << strExpression << "\n"
+			<< missatge<< normal() << "\n";
+		TestsListener::theInstance().testHasFailed(strExpression, file, linia);
+	}
+}
+
+
+
+void Assert::assertEquals( const char * expected, const char * result,
+	const char* file, int linia )
+{
+	assertEquals(std::string(expected), std::string(result),
+		file, linia);
+
+}
+void Assert::assertEquals( const bool& expected, const bool& result,
+	const char* file, int linia )
+{
+	assertEquals(
+		(expected?"true":"false"), 
+		(result?"true":"false"),
+		file, linia);
+}
+
+// floating point numbers comparisons taken
+// from c/c++ users journal. dec 04 pag 10
+bool isNaN(double x)
+{
+	bool b1 = (x < 0.0);
+	bool b2 = (x >= 0.0);
+	return !(b1 || b2);
+}
+
+double scaledEpsilon(const double& expected, const double& fuzzyEpsilon )
+{ 
+	const double aa = fabs(expected)+1;
+	return (std::isinf(aa))? fuzzyEpsilon: fuzzyEpsilon * aa;
+}
+bool fuzzyEquals(double expected, double result, double fuzzyEpsilon)
+{
+	return (expected==result) || ( fabs(expected-result) <= scaledEpsilon(expected, fuzzyEpsilon) );
+}
+void Assert::assertEquals( const double& expected, const double& result,
+		const char* file, int linia )
+{	
+	const double fuzzyEpsilon = 0.000001;
+	assertEqualsEpsilon( expected, result, fuzzyEpsilon, file, linia );
+}
+
+void Assert::assertEquals( const float& expected, const float& result,
+		const char* file, int linia )
+{
+	assertEquals((double)expected, (double)result, file, linia);
+}
+void Assert::assertEquals( const long double& expected, const long double& result,
+		const char* file, int linia )
+{
+	assertEquals((double)expected, (double)result, file, linia);
+}
+void Assert::assertEqualsEpsilon( const double& expected, const double& result, const double& epsilon,
+		const char* file, int linia )
+{
+	if (isNaN(expected) && isNaN(result) ) return;
+	if (!isNaN(expected) && !isNaN(result) && fuzzyEquals(expected, result, epsilon) ) return;
+
+	std::stringstream anError;
+	anError
+			<< errmsgTag_testFailedIn() << file
+			<< errmsgTag_inLine() << linia << "\n" 
+			<< errmsgTag_expected()
+			<< bold() << expected << normal() << " "
+			<< errmsgTag_butWas() 
+			<< bold() << result << normal() << "\n";
+
+	TestsListener::theInstance().errorsLog() << anError.str();
+
+	TestsListener::theInstance().testHasFailed(anError.str().c_str(), file, linia);
+}
+
+int Assert::notEqualIndex( const std::string & one, const std::string & other )
+{
+	int end = MIN(one.length(), other.length());
+	for ( int index = 0; index < end; index++ )
+		if (one[index] != other[index] )
+			return index;
+	return end;
+}
+
+
+/**
+ * we overload the assert with string doing colored diffs
+ *
+ * MS Visual6 doesn't allow string by reference :-( 
+ */
+void Assert::assertEquals( const std::string expected, const std::string result,
+	const char* file, int linia )
+{
+	if(expected == result)
+		return;
+	
+	int indexDiferent = notEqualIndex(expected, result);
+
+	std::stringstream anError;
+	anError
+		<< file << ", linia: " << linia << "\n"
+		<< errmsgTag_expected() << "\n" << blue() 
+		<< expected.substr(0,indexDiferent)
+		<< green() << expected.substr(indexDiferent) 
+		<< normal() << "\n"
+		<< errmsgTag_butWas() << blue() << "\n" 
+		<< result.substr(0,indexDiferent)
+		<< red() << result.substr(indexDiferent) 
+		<< normal() << std::endl;
+
+	TestsListener::theInstance().errorsLog() << anError.str();
+
+	TestsListener::theInstance().testHasFailed(anError.str().c_str(), file, linia);
+}
+void Assert::fail(const char* motiu, const char* file, int linia)
+{
+	TestsListener::theInstance().errorsLog() <<
+		file << errmsgTag_inLine() << linia << "\n" <<
+		"Reason: " << motiu << "\n";
+
+	TestsListener::theInstance().testHasFailed(motiu, file, linia);
+}
+
+

+ 504 - 0
spine-cpp/spine-cpp-unit-tests/minicppunit/MiniCppUnit.hxx

@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2003-2004  Pau Arum� & David Garc�a
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef MiniCppUnit_hxx
+#define MiniCppUnit_hxx
+
+/**
+ * @mainpage
+ * miniCppUnit 
+ * (C) 2003-2006 Pau Arumi & David Garcia
+ * 
+ * @version 2.5 2006-03-14
+ *   - MS Visual compatibility: SConstruct ccflags, usage example, #ifdefs
+ * @version 2.4 2006-03-14
+ *   - exit test case after first failure
+ *   - double and float comparison with fuzzy equals (using scalable epsilon)
+ *   - have into account not a numbers
+ *   - new ASSERT_EQUALS_EPSILON macro
+ *   - more colors, and disabled when comiled in MS Visual
+ *   - removed catalan location.
+ *   - UsageExample.cxx now uses all macros and features
+ * @version 2.3 2006-02-13 added usage example and SConstruct
+ * @version 2.2 2004-11-28 code in english and tests suites
+ * @version 2.1 2004-11-04 char* especialization
+ * @version 2.0 2004-10-26 TestsFactory
+ * @version 1.0 2003-10-28 initial
+ * 
+ * Example of use:
+ *
+ * @code
+ * #include "MiniCppUnit.hxx"
+ * class MyTests : public TestFixture<MyTests>
+ * {
+ *  public:
+ *  	TEST_FIXTURE( MyTests )
+ *		{
+ *			CAS_DE_TEST( testAddition );
+ *			// etc
+ *		}
+ *		void testAddition()
+ *		{ 
+ *			ASSERT_EQUALS( 4, 1+1+2 );
+ *		}  
+ *		// etc
+ * };
+ *
+ * REGISTER_FIXTURE( MyTests );
+ * @endcode
+ * @code
+ * int main()
+ * {
+ *	return TestFixtureFactory::theInstance().runTests() ? 0 : -1;
+ * }
+ * @endcode
+ * Good things: 
+ *
+ *   - it's a tiny framework made up of two or three src files. 
+ *     => no need to install as a library
+ *   - object oriented and makes use of several GoF patterns 
+ *   - very simple usage. Just needs to learn very few C macros
+ *   - string asserts are simpler to use than cppunit
+ *   - string asserts are enhanced with coloured diffs
+ *   - concrete test classes are totally decoupled via static factory
+ *     => no src file have to include them all.
+ *   - it have test suite hierarchies 
+ *   - compatible with non-standard compliant VisualC6 
+ *     (though not necessary good ;)
+ */
+
+#include <iostream>
+#include <string>
+#include <sstream>
+#include <list>
+
+#if _MSC_VER < 1300
+/** necesary for Visual 6 which don't define std::min */
+namespace std
+{
+	template<typename T> T min(const T& a, const T& b) { return a < b ? a: b; }
+}
+#endif
+
+#include "../teamcity/teamcity_cppunit.h"
+
+extern JetBrains::TeamcityProgressListener gTeamCityListener;
+
+/**
+ * A singleton class. 
+ * Receives tests results and stores messages to the test log
+ * for later listing.
+ * It's a singleton for an easy global access from the 'Asserts'
+ * methods but it is probably asking for a refactoring in order to limit
+ * access only to TestFixtures
+ */
+class TestsListener
+{
+public:
+	/** accessor to the global (static) singleton instance */
+	static TestsListener& theInstance();
+	std::stringstream& errorsLog();
+	std::string logString();
+	void currentTestName( std::string& name);
+	static void testHasRun();
+	static void testHasPassed();
+	static void testHasFailed(const char* reason, const char* file, int line);
+	static void testHasThrown();
+	/** the human readable summary of run tests*/
+	std::string summary();
+	/** returns wheather all run tests have passed */
+	static bool allTestsPassed();
+	
+private:
+	static const char* errmsgTag_nameOfTest() { return "Test failed: "; }
+	
+	/** constructor private: force the singleton to be wellbehaved ! */
+	TestsListener();
+	
+	std::string* _currentTestName;
+	std::stringstream _log;
+	unsigned _executed;
+	unsigned _failed;
+	unsigned _exceptions;
+};
+
+class TestFailedException
+{
+};
+
+/**
+ * Abstract class with interface that allows run a test. That is runTest
+ * and name. It is implemented by TestFixture and TestCase
+ *
+ * It does the 'Component' role in the 'Composite' patten
+ **/
+class Test
+{
+public:
+	virtual ~Test(){}
+	/** run the test: exercice the code and check results*/
+	virtual void runTest() = 0;
+	/** the test human-readable name */
+	virtual std::string name() const = 0;
+};
+
+
+/**
+ * This class is just a placeholder for all assert functions --as static methods.
+ * It is meant for being used just by the assert macros
+ */
+class Assert
+{
+	static const char * errmsgTag_testFailedIn() { return "Test failed in "; }
+	static const char * errmsgTag_inLine() { return ", line: "; };
+	static const char * errmsgTag_failedExpression() { return "Failed expression: "; } 
+	static const char * errmsgTag_expected() { return "Expected: "; } 
+	static const char * errmsgTag_butWas() { return "But was: "; } 
+
+public:
+#ifdef _MSC_VER
+	static const char * blue() { return ""; }
+	static const char * green() { return ""; }
+	static const char * red() { return ""; }
+	static const char * normal() { return ""; }
+	static const char * bold() { return ""; }
+	static const char * yellow() { return ""; }
+#else
+	static const char * blue() { return "\033[36;1m"; }
+	static const char * green() { return "\033[32;1m"; }
+	static const char * red() { return "\033[31;1m"; }
+	static const char * normal() { return "\033[0m"; }
+	static const char * bold() { return "\033[" "1m"; }
+	static const char * yellow() { return "\033[93;1m"; }
+#endif
+	template<typename AType>
+	static void assertEquals( const AType& expected, const AType& result,
+		const char* file="", int linia=0 )
+	{
+		if(expected != result)
+		{
+			std::stringstream anError;
+
+			anError
+				<< file << ", linia: " << linia << "\n"
+				<< errmsgTag_expected() << " " << expected << " "
+				<< errmsgTag_butWas() << " " << result << "\n";
+
+			// TestsListener::theInstance().errorsLog() << anError;
+
+			TestsListener::theInstance().testHasFailed(anError.str().c_str(), file, linia);
+		}
+	}
+
+	static void assertTrue(char* strExpression, bool expression,
+			const char* file="", int linia=0);
+
+	static void assertTrueMissatge(char* strExpression, bool expression, 
+			const char* missatge, const char* file="", int linia=0);
+
+	static void assertEquals( const char * expected, const char * result,
+		const char* file="", int linia=0 );
+	
+	static void assertEquals( const bool& expected, const bool& result,
+		const char* file="", int linia=0 );
+	
+	static void assertEquals( const double& expected, const double& result,
+		const char* file="", int linia=0 );
+
+	static void assertEquals( const float& expected, const float& result,
+		const char* file="", int linia=0 );
+	
+	static void assertEquals( const long double& expected, const long double& result,
+		const char* file="", int linia=0 );
+	
+	static void assertEqualsEpsilon( const double& expected, const double& result, const double& epsilon,
+		const char* file="", int linia=0 );
+
+	static int notEqualIndex( const std::string & one, const std::string & other );
+
+	/**
+	 * we overload the assert with string doing colored diffs
+	 *
+	 * MS Visual6 doesn't allow string by reference :-( 
+	 */
+	static void assertEquals( const std::string expected, const std::string result,
+		const char* file="", int linia=0 );
+	
+	static void fail(const char* motiu, const char* file="", int linia=0);
+
+
+};
+
+/**
+ * A TestFixture is a class that contain TestCases --which corresponds to 
+ * ConcreteTestFixture methods-- common objects uder tests, and setUp and
+ * tearDown methods which are automatically executed before and after each
+ * test case.
+ *
+ * Is the base class of ConcreteFixtures implemented by the framework user
+ *
+ * It does the 'Composite' role in the 'Composite' GoF pattern.
+ * Its composite children are TestCases, which wrapps the test methods.
+ *
+ * It is a template class parametrized by ConcreteTestFixture so that it can 
+ * instantiate TestCase objects templatized with this same parameter: it needs the 
+ * concrete class type for calling its non-static methods.
+ */
+template <typename ConcreteTestFixture>
+class TestFixture : public Test
+{
+protected:
+
+	typedef ConcreteTestFixture ConcreteFixture;
+	typedef void(ConcreteTestFixture::*TestCaseMethod)();
+
+	/**
+	 * Wrapper for the test methods of concrete TestFixtures.
+	 *
+	 * Makes the 'Leave' role in the 'Composite' GoF pattern because can't be
+	 * be a composition of other tests.
+	 * 
+	 * It's also a case of 'Command' pattern because it encapsules in an object 
+	 * certain functionality whose execution depends on some deferred entity.
+	 */
+	class TestCase : public Test
+	{
+	public:
+		TestCase(ConcreteFixture* parent, TestCaseMethod method, const std::string & name) : 
+		  _parent(parent),
+		  _testCaseMethod(method),
+		  _name(name)
+		{
+		}
+		/** calls TestFixture method.  setUp and tearDown methods are called by
+		 * its parent TestFixture (in its runTest method).
+		 * it is robust to unexpected exceptions (throw) */
+		void runTest()
+		{
+			TestsListener::theInstance().testHasRun();
+			TestsListener::theInstance().currentTestName(_name);
+			try
+			{
+				(_parent->*_testCaseMethod)();
+				TestsListener::theInstance().testHasPassed();
+			}
+			catch( std::exception& error )
+			{
+				TestsListener::theInstance().testHasThrown();
+				TestsListener::theInstance().errorsLog() 
+					<< "std::exception catched by MiniCppUnit: \n"
+					<< "what() : " 
+					<< Assert::yellow() << error.what() 
+					<< Assert::normal() << "\n";
+			}
+			catch ( TestFailedException& ) //just for skiping current test case
+			{
+				// the assert() calls testHasFailed()
+			}
+			catch(...)
+			{
+				TestsListener::theInstance().testHasThrown();
+				TestsListener::theInstance().errorsLog() 
+					<< "non standard exception catched by MiniCppUnit.\n";
+			}
+		}
+
+		/** the TestFixture method hame */
+		std::string name() const
+		{
+			return _name;
+		}
+
+	private:
+		ConcreteFixture* _parent;
+		TestCaseMethod _testCaseMethod;
+		std::string _name;
+	};
+    //------------- end of class TestCase ----------------------------
+
+private:
+	
+	typedef std::list<Test*> TestCases;
+	TestCases _testCases;
+	std::string _name;
+
+	void testsList() const
+	{
+		std::cout << "\n+ " << name() << "\n";
+		for( TestCases::const_iterator it=_testCases.begin(); 
+			it!=_testCases.end(); it++ )
+			std::cout << "  - "<< (*it)->name() << "\n";
+	}
+	
+
+public:
+	virtual void setUp() {}
+	virtual void tearDown() {}
+
+	std::string name() const 
+	{
+		return _name;
+	};
+
+	TestFixture(const std::string& name="A text fixture") : _name(name)
+	{
+	}
+
+	void afegeixCasDeTest(ConcreteFixture* parent, TestCaseMethod method, const char* name)
+	{
+		TestCase* casDeTest = new TestCase(parent, method, _name + "::" + name);
+		_testCases.push_back( casDeTest );
+	}
+	/** calls each test after setUp and tearDown TestFixture methods */
+	void runTest()
+	{
+		testsList();
+		TestCases::iterator it;
+		for( it=_testCases.begin(); it!=_testCases.end(); it++)
+		{
+			setUp();
+			(*it)->runTest();
+			tearDown();
+		}
+	}
+	/** TestCase that wrapps TestFixture methods are dynamically created and owned by 
+	 * the TestFixture. So here we clean it up*/
+	virtual ~TestFixture()
+	{	
+		TestCases::iterator it;
+		for( it =_testCases.begin(); it!=_testCases.end(); it++)
+			delete (*it);
+	}
+};
+
+
+/**
+ * This class is aimed to hold a creator method for each concrete TestFixture
+ */
+class TestFixtureFactory
+{
+private:
+	/** Well behaved singleton: 
+	 *  Don't allow instantiation apart from theInstance(), so private ctr.*/
+	TestFixtureFactory()
+	{
+	}
+	typedef Test* (*FixtureCreator)();
+	std::list<FixtureCreator> _creators;
+public:
+	/** Accessor to the (static) singleton instance */
+	static TestFixtureFactory& theInstance()
+	{
+		static TestFixtureFactory theFactory;
+		return theFactory;
+	}
+	bool runTests()
+	{
+		std::list<FixtureCreator>::iterator it;
+		for(it=_creators.begin(); it!=_creators.end(); it++)
+		{	
+			FixtureCreator creator = *it;
+			Test* test = creator();
+			test->runTest();
+			delete test;
+		}
+		std::string errors =  TestsListener::theInstance().logString();
+		if (errors!="") std::cout << "\n\nError Details:\n" << errors;
+		std::cout << TestsListener::theInstance().summary();
+
+		return TestsListener::theInstance().allTestsPassed();	
+	}
+	void addFixtureCreator(FixtureCreator creator)
+	{
+		_creators.push_back( creator );
+	}
+	
+};
+
+/** 
+ * Macro a usar despr�s de cada classe de test
+ */
+#define REGISTER_FIXTURE( ConcreteTestFixture ) \
+\
+Test* Creador##ConcreteTestFixture() { return new ConcreteTestFixture; } \
+\
+class Registrador##ConcreteTestFixture \
+{ \
+public: \
+	Registrador##ConcreteTestFixture() \
+	{ \
+		TestFixtureFactory::theInstance().addFixtureCreator( \
+				Creador##ConcreteTestFixture); \
+	} \
+}; \
+static Registrador##ConcreteTestFixture estatic##ConcreteTestFixture;
+
+
+/**
+ * Assert macros to use in test methods. An assert is a test condition
+ * we want to check.
+ */
+#define ASSERT_EQUALS( expected, result) \
+	Assert::assertEquals( expected, result, __FILE__, __LINE__ );
+
+#define ASSERT_EQUALS_EPSILON( expected, result, epsilon) \
+	Assert::assertEqualsEpsilon( expected, result, epsilon, __FILE__, __LINE__ );
+
+#define ASSERT( exp ) \
+	Assert::assertTrue(#exp, exp, __FILE__, __LINE__);
+
+#define ASSERT_MESSAGE( exp, message ) \
+	Assert::assertTrueMissatge(#exp, exp, message, __FILE__, __LINE__);
+
+#define FAIL( why ) \
+	Assert::fail(#why, __FILE__, __LINE__);
+
+/**
+ * Macros that allows to write the  constructor of the concrete TestFixture.
+ * What the constructor does is agregate a wrapper for each test case (method)
+ * As easy to write as this:
+ *
+ * @code
+ * class MyTests : public TestFixture<MyTests>
+ * {
+ *  public:
+ *  	TEST_FIXTURE( MyTests )
+ *	{
+ *		TEST_CASE( test );
+ *		// etc
+ *	}
+ *	void test()
+ *	{
+ *		ASSERT_EQUALS( 4, 1+1+2 );
+ *	}
+ * @endcode
+ */
+
+#define TEST_FIXTURE( ConcreteFixture ) \
+	ConcreteFixture() : TestFixture<ConcreteFixture>( #ConcreteFixture )
+
+#define TEST_CASE( methodName ) \
+	afegeixCasDeTest( this, &ConcreteFixture::methodName, #methodName );
+
+
+
+
+			     
+#endif  // MiniCppUnit_hxx

+ 831 - 0
spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test.xcodeproj/project.pbxproj

@@ -0,0 +1,831 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 48;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		BB4E38561FD9C85600709FF2 /* spineboy-ess.json in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E38541FD9C85600709FF2 /* spineboy-ess.json */; };
+		BB4E38571FD9C85600709FF2 /* spineboy.atlas in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E38551FD9C85600709FF2 /* spineboy.atlas */; };
+		BB4E385A1FD9C86400709FF2 /* raptor.atlas in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E38581FD9C86400709FF2 /* raptor.atlas */; };
+		BB4E385B1FD9C86400709FF2 /* raptor-pro.json in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E38591FD9C86400709FF2 /* raptor-pro.json */; };
+		BB4E385E1FD9C87700709FF2 /* goblins-pro.json in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E385C1FD9C87600709FF2 /* goblins-pro.json */; };
+		BB4E385F1FD9C87700709FF2 /* goblins.atlas in CopyFiles */ = {isa = PBXBuildFile; fileRef = BB4E385D1FD9C87700709FF2 /* goblins.atlas */; };
+		BB6017131FD9289A009BD546 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017121FD9289A009BD546 /* main.cpp */; };
+		BB6017A21FD928AC009BD546 /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017671FD928AC009BD546 /* Attachment.cpp */; };
+		BB6017A31FD928AC009BD546 /* Skeleton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017681FD928AC009BD546 /* Skeleton.cpp */; };
+		BB6017A41FD928AC009BD546 /* TranslateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017691FD928AC009BD546 /* TranslateTimeline.cpp */; };
+		BB6017A51FD928AC009BD546 /* Extension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176A1FD928AC009BD546 /* Extension.cpp */; };
+		BB6017A61FD928AC009BD546 /* Updatable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176B1FD928AC009BD546 /* Updatable.cpp */; };
+		BB6017A71FD928AC009BD546 /* Bone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176C1FD928AC009BD546 /* Bone.cpp */; };
+		BB6017A81FD928AC009BD546 /* AtlasAttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176D1FD928AC009BD546 /* AtlasAttachmentLoader.cpp */; };
+		BB6017A91FD928AC009BD546 /* EventTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176E1FD928AC009BD546 /* EventTimeline.cpp */; };
+		BB6017AA1FD928AC009BD546 /* PathConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60176F1FD928AC009BD546 /* PathConstraint.cpp */; };
+		BB6017AB1FD928AC009BD546 /* VertexAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017701FD928AC009BD546 /* VertexAttachment.cpp */; };
+		BB6017AC1FD928AC009BD546 /* TextureLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017711FD928AC009BD546 /* TextureLoader.cpp */; };
+		BB6017AD1FD928AC009BD546 /* SkeletonData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017721FD928AC009BD546 /* SkeletonData.cpp */; };
+		BB6017AE1FD928AC009BD546 /* TransformConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017731FD928AC009BD546 /* TransformConstraintTimeline.cpp */; };
+		BB6017AF1FD928AC009BD546 /* IkConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017741FD928AC009BD546 /* IkConstraint.cpp */; };
+		BB6017B01FD928AC009BD546 /* CurveTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017751FD928AC009BD546 /* CurveTimeline.cpp */; };
+		BB6017B11FD928AC009BD546 /* AnimationStateData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017761FD928AC009BD546 /* AnimationStateData.cpp */; };
+		BB6017B21FD928AC009BD546 /* Constraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017771FD928AC009BD546 /* Constraint.cpp */; };
+		BB6017B31FD928AC009BD546 /* BoundingBoxAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017781FD928AC009BD546 /* BoundingBoxAttachment.cpp */; };
+		BB6017B41FD928AC009BD546 /* PathAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017791FD928AC009BD546 /* PathAttachment.cpp */; };
+		BB6017B51FD928AC009BD546 /* MeshAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177A1FD928AC009BD546 /* MeshAttachment.cpp */; };
+		BB6017B61FD928AC009BD546 /* TransformConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177B1FD928AC009BD546 /* TransformConstraint.cpp */; };
+		BB6017B71FD928AC009BD546 /* Skin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177C1FD928AC009BD546 /* Skin.cpp */; };
+		BB6017B81FD928AC009BD546 /* RTTI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177D1FD928AC009BD546 /* RTTI.cpp */; };
+		BB6017B91FD928AC009BD546 /* MathUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177E1FD928AC009BD546 /* MathUtil.cpp */; };
+		BB6017BA1FD928AC009BD546 /* IkConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60177F1FD928AC009BD546 /* IkConstraintData.cpp */; };
+		BB6017BB1FD928AC009BD546 /* Atlas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017801FD928AC009BD546 /* Atlas.cpp */; };
+		BB6017BC1FD928AC009BD546 /* ClippingAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017811FD928AC009BD546 /* ClippingAttachment.cpp */; };
+		BB6017BD1FD928AC009BD546 /* PathConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017821FD928AC009BD546 /* PathConstraintData.cpp */; };
+		BB6017BE1FD928AC009BD546 /* Timeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017831FD928AC009BD546 /* Timeline.cpp */; };
+		BB6017BF1FD928AC009BD546 /* SkeletonBinary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017841FD928AC009BD546 /* SkeletonBinary.cpp */; };
+		BB6017C01FD928AC009BD546 /* ScaleTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017851FD928AC009BD546 /* ScaleTimeline.cpp */; };
+		BB6017C11FD928AC009BD546 /* LinkedMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017861FD928AC009BD546 /* LinkedMesh.cpp */; };
+		BB6017C21FD928AC009BD546 /* PointAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017871FD928AC009BD546 /* PointAttachment.cpp */; };
+		BB6017C31FD928AC009BD546 /* RegionAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017881FD928AC009BD546 /* RegionAttachment.cpp */; };
+		BB6017C41FD928AC009BD546 /* DeformTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017891FD928AC009BD546 /* DeformTimeline.cpp */; };
+		BB6017C51FD928AC009BD546 /* Animation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178A1FD928AC009BD546 /* Animation.cpp */; };
+		BB6017C61FD928AC009BD546 /* AttachmentLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178B1FD928AC009BD546 /* AttachmentLoader.cpp */; };
+		BB6017C71FD928AC009BD546 /* DrawOrderTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178C1FD928AC009BD546 /* DrawOrderTimeline.cpp */; };
+		BB6017C81FD928AC009BD546 /* AttachmentTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178D1FD928AC009BD546 /* AttachmentTimeline.cpp */; };
+		BB6017C91FD928AC009BD546 /* EventData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178E1FD928AC009BD546 /* EventData.cpp */; };
+		BB6017CA1FD928AC009BD546 /* PathConstraintSpacingTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60178F1FD928AC009BD546 /* PathConstraintSpacingTimeline.cpp */; };
+		BB6017CB1FD928AC009BD546 /* PathConstraintPositionTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017901FD928AC009BD546 /* PathConstraintPositionTimeline.cpp */; };
+		BB6017CC1FD928AC009BD546 /* TransformConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017911FD928AC009BD546 /* TransformConstraintData.cpp */; };
+		BB6017CD1FD928AC009BD546 /* SkeletonClipping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017921FD928AC009BD546 /* SkeletonClipping.cpp */; };
+		BB6017CE1FD928AC009BD546 /* TwoColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017931FD928AC009BD546 /* TwoColorTimeline.cpp */; };
+		BB6017CF1FD928AC009BD546 /* Slot.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017941FD928AC009BD546 /* Slot.cpp */; };
+		BB6017D01FD928AC009BD546 /* AnimationState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017951FD928AC009BD546 /* AnimationState.cpp */; };
+		BB6017D11FD928AC009BD546 /* SkeletonJson.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017961FD928AC009BD546 /* SkeletonJson.cpp */; };
+		BB6017D21FD928AC009BD546 /* BoneData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017971FD928AC009BD546 /* BoneData.cpp */; };
+		BB6017D31FD928AC009BD546 /* IkConstraintTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017981FD928AC009BD546 /* IkConstraintTimeline.cpp */; };
+		BB6017D41FD928AC009BD546 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017991FD928AC009BD546 /* Event.cpp */; };
+		BB6017D51FD928AC009BD546 /* RotateTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179A1FD928AC009BD546 /* RotateTimeline.cpp */; };
+		BB6017D61FD928AC009BD546 /* PathConstraintMixTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179B1FD928AC009BD546 /* PathConstraintMixTimeline.cpp */; };
+		BB6017D71FD928AC009BD546 /* Triangulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179C1FD928AC009BD546 /* Triangulator.cpp */; };
+		BB6017D81FD928AC009BD546 /* Json.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179D1FD928AC009BD546 /* Json.cpp */; };
+		BB6017D91FD928AC009BD546 /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179E1FD928AC009BD546 /* SkeletonBounds.cpp */; };
+		BB6017DA1FD928AC009BD546 /* SlotData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB60179F1FD928AC009BD546 /* SlotData.cpp */; };
+		BB6017DB1FD928AC009BD546 /* ShearTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017A01FD928AC009BD546 /* ShearTimeline.cpp */; };
+		BB6017DC1FD928AC009BD546 /* ColorTimeline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017A11FD928AC009BD546 /* ColorTimeline.cpp */; };
+		BB6017E21FD928F7009BD546 /* KMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017E01FD928F6009BD546 /* KMemory.cpp */; };
+		BB6017E31FD928F7009BD546 /* KString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017E11FD928F6009BD546 /* KString.cpp */; };
+		BB6017E71FD929D0009BD546 /* MiniCppUnit.cxx in Sources */ = {isa = PBXBuildFile; fileRef = BB6017E61FD929D0009BD546 /* MiniCppUnit.cxx */; };
+		BB6017EE1FD929F4009BD546 /* teamcity_cppunit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017EA1FD929F4009BD546 /* teamcity_cppunit.cpp */; };
+		BB6017EF1FD929F4009BD546 /* teamcity_messages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017ED1FD929F4009BD546 /* teamcity_messages.cpp */; };
+		BB6018081FD92AF4009BD546 /* SpineEventMonitor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BB6017FD1FD92AF3009BD546 /* SpineEventMonitor.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		BB4E38471FD9C72600709FF2 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = testdata/spineboy;
+			dstSubfolderSpec = 16;
+			files = (
+				BB4E38561FD9C85600709FF2 /* spineboy-ess.json in CopyFiles */,
+				BB4E38571FD9C85600709FF2 /* spineboy.atlas in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		BB4E384A1FD9C79D00709FF2 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = testdata/raptor;
+			dstSubfolderSpec = 16;
+			files = (
+				BB4E385A1FD9C86400709FF2 /* raptor.atlas in CopyFiles */,
+				BB4E385B1FD9C86400709FF2 /* raptor-pro.json in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		BB4E384B1FD9C79E00709FF2 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = testdata/goblins;
+			dstSubfolderSpec = 16;
+			files = (
+				BB4E385E1FD9C87700709FF2 /* goblins-pro.json in CopyFiles */,
+				BB4E385F1FD9C87700709FF2 /* goblins.atlas in CopyFiles */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		BB60170D1FD9289A009BD546 /* CopyFiles */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = /usr/share/man/man1/;
+			dstSubfolderSpec = 0;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 1;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		BB4E38541FD9C85600709FF2 /* spineboy-ess.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "spineboy-ess.json"; path = "../../../examples/spineboy/export/spineboy-ess.json"; sourceTree = "<group>"; };
+		BB4E38551FD9C85600709FF2 /* spineboy.atlas */ = {isa = PBXFileReference; lastKnownFileType = text; name = spineboy.atlas; path = ../../../examples/spineboy/export/spineboy.atlas; sourceTree = "<group>"; };
+		BB4E38581FD9C86400709FF2 /* raptor.atlas */ = {isa = PBXFileReference; lastKnownFileType = text; name = raptor.atlas; path = ../../../examples/raptor/export/raptor.atlas; sourceTree = "<group>"; };
+		BB4E38591FD9C86400709FF2 /* raptor-pro.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "raptor-pro.json"; path = "../../../examples/raptor/export/raptor-pro.json"; sourceTree = "<group>"; };
+		BB4E385C1FD9C87600709FF2 /* goblins-pro.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; name = "goblins-pro.json"; path = "../../../examples/goblins/export/goblins-pro.json"; sourceTree = "<group>"; };
+		BB4E385D1FD9C87700709FF2 /* goblins.atlas */ = {isa = PBXFileReference; lastKnownFileType = text; name = goblins.atlas; path = ../../../examples/goblins/export/goblins.atlas; sourceTree = "<group>"; };
+		BB60170F1FD9289A009BD546 /* spine_unit_test */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = spine_unit_test; sourceTree = BUILT_PRODUCTS_DIR; };
+		BB6017121FD9289A009BD546 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
+		BB60171C1FD928AC009BD546 /* DeformTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeformTimeline.h; sourceTree = "<group>"; };
+		BB60171D1FD928AC009BD546 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Animation.h; sourceTree = "<group>"; };
+		BB60171E1FD928AC009BD546 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventData.h; sourceTree = "<group>"; };
+		BB60171F1FD928AC009BD546 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SlotData.h; sourceTree = "<group>"; };
+		BB6017201FD928AC009BD546 /* PathConstraintMixTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraintMixTimeline.h; sourceTree = "<group>"; };
+		BB6017211FD928AC009BD546 /* SkeletonClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonClipping.h; sourceTree = "<group>"; };
+		BB6017221FD928AC009BD546 /* Pool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pool.h; sourceTree = "<group>"; };
+		BB6017231FD928AC009BD546 /* TimelineType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimelineType.h; sourceTree = "<group>"; };
+		BB6017241FD928AC009BD546 /* TextureLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureLoader.h; sourceTree = "<group>"; };
+		BB6017251FD928AC009BD546 /* PositionMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PositionMode.h; sourceTree = "<group>"; };
+		BB6017261FD928AC009BD546 /* RTTI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RTTI.h; sourceTree = "<group>"; };
+		BB6017271FD928AC009BD546 /* PathAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathAttachment.h; sourceTree = "<group>"; };
+		BB6017281FD928AC009BD546 /* MixDirection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixDirection.h; sourceTree = "<group>"; };
+		BB6017291FD928AC009BD546 /* CurveTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurveTimeline.h; sourceTree = "<group>"; };
+		BB60172A1FD928AC009BD546 /* PointAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PointAttachment.h; sourceTree = "<group>"; };
+		BB60172B1FD928AC009BD546 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = "<group>"; };
+		BB60172C1FD928AC009BD546 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bone.h; sourceTree = "<group>"; };
+		BB60172D1FD928AC009BD546 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atlas.h; sourceTree = "<group>"; };
+		BB60172E1FD928AC009BD546 /* DrawOrderTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawOrderTimeline.h; sourceTree = "<group>"; };
+		BB60172F1FD928AC009BD546 /* TransformConstraintTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformConstraintTimeline.h; sourceTree = "<group>"; };
+		BB6017301FD928AC009BD546 /* IkConstraintTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraintTimeline.h; sourceTree = "<group>"; };
+		BB6017311FD928AC009BD546 /* VertexAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VertexAttachment.h; sourceTree = "<group>"; };
+		BB6017321FD928AC009BD546 /* AttachmentType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentType.h; sourceTree = "<group>"; };
+		BB6017331FD928AC009BD546 /* RotateMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RotateMode.h; sourceTree = "<group>"; };
+		BB6017341FD928AC009BD546 /* ClippingAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClippingAttachment.h; sourceTree = "<group>"; };
+		BB6017351FD928AC009BD546 /* PathConstraintPositionTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraintPositionTimeline.h; sourceTree = "<group>"; };
+		BB6017361FD928AC009BD546 /* RotateTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RotateTimeline.h; sourceTree = "<group>"; };
+		BB6017371FD928AC009BD546 /* Triangulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Triangulator.h; sourceTree = "<group>"; };
+		BB6017381FD928AC009BD546 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegionAttachment.h; sourceTree = "<group>"; };
+		BB6017391FD928AC009BD546 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Attachment.h; sourceTree = "<group>"; };
+		BB60173A1FD928AC009BD546 /* HashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashMap.h; sourceTree = "<group>"; };
+		BB60173B1FD928AC009BD546 /* TransformConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformConstraint.h; sourceTree = "<group>"; };
+		BB60173C1FD928AC009BD546 /* TransformMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformMode.h; sourceTree = "<group>"; };
+		BB60173D1FD928AC009BD546 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonJson.h; sourceTree = "<group>"; };
+		BB60173E1FD928AC009BD546 /* IkConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraintData.h; sourceTree = "<group>"; };
+		BB60173F1FD928AC009BD546 /* MixPose.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixPose.h; sourceTree = "<group>"; };
+		BB6017401FD928AC009BD546 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationStateData.h; sourceTree = "<group>"; };
+		BB6017411FD928AC009BD546 /* TwoColorTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TwoColorTimeline.h; sourceTree = "<group>"; };
+		BB6017421FD928AC009BD546 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skeleton.h; sourceTree = "<group>"; };
+		BB6017431FD928AC009BD546 /* ColorTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ColorTimeline.h; sourceTree = "<group>"; };
+		BB6017441FD928AC009BD546 /* SpacingMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpacingMode.h; sourceTree = "<group>"; };
+		BB6017451FD928AC009BD546 /* Vertices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vertices.h; sourceTree = "<group>"; };
+		BB6017461FD928AC009BD546 /* Constraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Constraint.h; sourceTree = "<group>"; };
+		BB6017471FD928AC009BD546 /* LinkedMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkedMesh.h; sourceTree = "<group>"; };
+		BB6017481FD928AC009BD546 /* ShearTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShearTimeline.h; sourceTree = "<group>"; };
+		BB6017491FD928AC009BD546 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Json.h; sourceTree = "<group>"; };
+		BB60174A1FD928AC009BD546 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentLoader.h; sourceTree = "<group>"; };
+		BB60174B1FD928AC009BD546 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Skin.h; sourceTree = "<group>"; };
+		BB60174C1FD928AC009BD546 /* AttachmentTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AttachmentTimeline.h; sourceTree = "<group>"; };
+		BB60174D1FD928AC009BD546 /* SkeletonBinary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBinary.h; sourceTree = "<group>"; };
+		BB60174E1FD928AC009BD546 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonData.h; sourceTree = "<group>"; };
+		BB60174F1FD928AC009BD546 /* ContainerUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContainerUtil.h; sourceTree = "<group>"; };
+		BB6017501FD928AC009BD546 /* PathConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraintData.h; sourceTree = "<group>"; };
+		BB6017511FD928AC009BD546 /* Updatable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Updatable.h; sourceTree = "<group>"; };
+		BB6017521FD928AC009BD546 /* TransformConstraintData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformConstraintData.h; sourceTree = "<group>"; };
+		BB6017531FD928AC009BD546 /* Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Extension.h; sourceTree = "<group>"; };
+		BB6017541FD928AC009BD546 /* BlendMode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlendMode.h; sourceTree = "<group>"; };
+		BB6017551FD928AC009BD546 /* PathConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraint.h; sourceTree = "<group>"; };
+		BB6017561FD928AC009BD546 /* PathConstraintSpacingTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathConstraintSpacingTimeline.h; sourceTree = "<group>"; };
+		BB6017571FD928AC009BD546 /* ScaleTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScaleTimeline.h; sourceTree = "<group>"; };
+		BB6017581FD928AC009BD546 /* IkConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IkConstraint.h; sourceTree = "<group>"; };
+		BB6017591FD928AC009BD546 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoundingBoxAttachment.h; sourceTree = "<group>"; };
+		BB60175A1FD928AC009BD546 /* MathUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathUtil.h; sourceTree = "<group>"; };
+		BB60175B1FD928AC009BD546 /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = "<group>"; };
+		BB60175C1FD928AC009BD546 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonBounds.h; sourceTree = "<group>"; };
+		BB60175D1FD928AC009BD546 /* Timeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Timeline.h; sourceTree = "<group>"; };
+		BB60175E1FD928AC009BD546 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Slot.h; sourceTree = "<group>"; };
+		BB60175F1FD928AC009BD546 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BoneData.h; sourceTree = "<group>"; };
+		BB6017601FD928AC009BD546 /* TranslateTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TranslateTimeline.h; sourceTree = "<group>"; };
+		BB6017611FD928AC009BD546 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationState.h; sourceTree = "<group>"; };
+		BB6017621FD928AC009BD546 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeshAttachment.h; sourceTree = "<group>"; };
+		BB6017631FD928AC009BD546 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtlasAttachmentLoader.h; sourceTree = "<group>"; };
+		BB6017641FD928AC009BD546 /* EventTimeline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventTimeline.h; sourceTree = "<group>"; };
+		BB6017671FD928AC009BD546 /* Attachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Attachment.cpp; sourceTree = "<group>"; };
+		BB6017681FD928AC009BD546 /* Skeleton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Skeleton.cpp; sourceTree = "<group>"; };
+		BB6017691FD928AC009BD546 /* TranslateTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TranslateTimeline.cpp; sourceTree = "<group>"; };
+		BB60176A1FD928AC009BD546 /* Extension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Extension.cpp; sourceTree = "<group>"; };
+		BB60176B1FD928AC009BD546 /* Updatable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Updatable.cpp; sourceTree = "<group>"; };
+		BB60176C1FD928AC009BD546 /* Bone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Bone.cpp; sourceTree = "<group>"; };
+		BB60176D1FD928AC009BD546 /* AtlasAttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtlasAttachmentLoader.cpp; sourceTree = "<group>"; };
+		BB60176E1FD928AC009BD546 /* EventTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTimeline.cpp; sourceTree = "<group>"; };
+		BB60176F1FD928AC009BD546 /* PathConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathConstraint.cpp; sourceTree = "<group>"; };
+		BB6017701FD928AC009BD546 /* VertexAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VertexAttachment.cpp; sourceTree = "<group>"; };
+		BB6017711FD928AC009BD546 /* TextureLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureLoader.cpp; sourceTree = "<group>"; };
+		BB6017721FD928AC009BD546 /* SkeletonData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonData.cpp; sourceTree = "<group>"; };
+		BB6017731FD928AC009BD546 /* TransformConstraintTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformConstraintTimeline.cpp; sourceTree = "<group>"; };
+		BB6017741FD928AC009BD546 /* IkConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IkConstraint.cpp; sourceTree = "<group>"; };
+		BB6017751FD928AC009BD546 /* CurveTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CurveTimeline.cpp; sourceTree = "<group>"; };
+		BB6017761FD928AC009BD546 /* AnimationStateData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationStateData.cpp; sourceTree = "<group>"; };
+		BB6017771FD928AC009BD546 /* Constraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Constraint.cpp; sourceTree = "<group>"; };
+		BB6017781FD928AC009BD546 /* BoundingBoxAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoundingBoxAttachment.cpp; sourceTree = "<group>"; };
+		BB6017791FD928AC009BD546 /* PathAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathAttachment.cpp; sourceTree = "<group>"; };
+		BB60177A1FD928AC009BD546 /* MeshAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MeshAttachment.cpp; sourceTree = "<group>"; };
+		BB60177B1FD928AC009BD546 /* TransformConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformConstraint.cpp; sourceTree = "<group>"; };
+		BB60177C1FD928AC009BD546 /* Skin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Skin.cpp; sourceTree = "<group>"; };
+		BB60177D1FD928AC009BD546 /* RTTI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RTTI.cpp; sourceTree = "<group>"; };
+		BB60177E1FD928AC009BD546 /* MathUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathUtil.cpp; sourceTree = "<group>"; };
+		BB60177F1FD928AC009BD546 /* IkConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IkConstraintData.cpp; sourceTree = "<group>"; };
+		BB6017801FD928AC009BD546 /* Atlas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Atlas.cpp; sourceTree = "<group>"; };
+		BB6017811FD928AC009BD546 /* ClippingAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClippingAttachment.cpp; sourceTree = "<group>"; };
+		BB6017821FD928AC009BD546 /* PathConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathConstraintData.cpp; sourceTree = "<group>"; };
+		BB6017831FD928AC009BD546 /* Timeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Timeline.cpp; sourceTree = "<group>"; };
+		BB6017841FD928AC009BD546 /* SkeletonBinary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonBinary.cpp; sourceTree = "<group>"; };
+		BB6017851FD928AC009BD546 /* ScaleTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScaleTimeline.cpp; sourceTree = "<group>"; };
+		BB6017861FD928AC009BD546 /* LinkedMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LinkedMesh.cpp; sourceTree = "<group>"; };
+		BB6017871FD928AC009BD546 /* PointAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PointAttachment.cpp; sourceTree = "<group>"; };
+		BB6017881FD928AC009BD546 /* RegionAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegionAttachment.cpp; sourceTree = "<group>"; };
+		BB6017891FD928AC009BD546 /* DeformTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeformTimeline.cpp; sourceTree = "<group>"; };
+		BB60178A1FD928AC009BD546 /* Animation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Animation.cpp; sourceTree = "<group>"; };
+		BB60178B1FD928AC009BD546 /* AttachmentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttachmentLoader.cpp; sourceTree = "<group>"; };
+		BB60178C1FD928AC009BD546 /* DrawOrderTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawOrderTimeline.cpp; sourceTree = "<group>"; };
+		BB60178D1FD928AC009BD546 /* AttachmentTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AttachmentTimeline.cpp; sourceTree = "<group>"; };
+		BB60178E1FD928AC009BD546 /* EventData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventData.cpp; sourceTree = "<group>"; };
+		BB60178F1FD928AC009BD546 /* PathConstraintSpacingTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathConstraintSpacingTimeline.cpp; sourceTree = "<group>"; };
+		BB6017901FD928AC009BD546 /* PathConstraintPositionTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathConstraintPositionTimeline.cpp; sourceTree = "<group>"; };
+		BB6017911FD928AC009BD546 /* TransformConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformConstraintData.cpp; sourceTree = "<group>"; };
+		BB6017921FD928AC009BD546 /* SkeletonClipping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonClipping.cpp; sourceTree = "<group>"; };
+		BB6017931FD928AC009BD546 /* TwoColorTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TwoColorTimeline.cpp; sourceTree = "<group>"; };
+		BB6017941FD928AC009BD546 /* Slot.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Slot.cpp; sourceTree = "<group>"; };
+		BB6017951FD928AC009BD546 /* AnimationState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnimationState.cpp; sourceTree = "<group>"; };
+		BB6017961FD928AC009BD546 /* SkeletonJson.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonJson.cpp; sourceTree = "<group>"; };
+		BB6017971FD928AC009BD546 /* BoneData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoneData.cpp; sourceTree = "<group>"; };
+		BB6017981FD928AC009BD546 /* IkConstraintTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IkConstraintTimeline.cpp; sourceTree = "<group>"; };
+		BB6017991FD928AC009BD546 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Event.cpp; sourceTree = "<group>"; };
+		BB60179A1FD928AC009BD546 /* RotateTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RotateTimeline.cpp; sourceTree = "<group>"; };
+		BB60179B1FD928AC009BD546 /* PathConstraintMixTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PathConstraintMixTimeline.cpp; sourceTree = "<group>"; };
+		BB60179C1FD928AC009BD546 /* Triangulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Triangulator.cpp; sourceTree = "<group>"; };
+		BB60179D1FD928AC009BD546 /* Json.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Json.cpp; sourceTree = "<group>"; };
+		BB60179E1FD928AC009BD546 /* SkeletonBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonBounds.cpp; sourceTree = "<group>"; };
+		BB60179F1FD928AC009BD546 /* SlotData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SlotData.cpp; sourceTree = "<group>"; };
+		BB6017A01FD928AC009BD546 /* ShearTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShearTimeline.cpp; sourceTree = "<group>"; };
+		BB6017A11FD928AC009BD546 /* ColorTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ColorTimeline.cpp; sourceTree = "<group>"; };
+		BB6017DE1FD928F6009BD546 /* KMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KMemory.h; sourceTree = "<group>"; };
+		BB6017DF1FD928F6009BD546 /* KString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KString.h; sourceTree = "<group>"; };
+		BB6017E01FD928F6009BD546 /* KMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KMemory.cpp; sourceTree = "<group>"; };
+		BB6017E11FD928F6009BD546 /* KString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KString.cpp; sourceTree = "<group>"; };
+		BB6017E51FD929D0009BD546 /* MiniCppUnit.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = MiniCppUnit.hxx; sourceTree = "<group>"; };
+		BB6017E61FD929D0009BD546 /* MiniCppUnit.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiniCppUnit.cxx; sourceTree = "<group>"; };
+		BB6017E91FD929F4009BD546 /* teamcity_cppunit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = teamcity_cppunit.h; sourceTree = "<group>"; };
+		BB6017EA1FD929F4009BD546 /* teamcity_cppunit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = teamcity_cppunit.cpp; sourceTree = "<group>"; };
+		BB6017EB1FD929F4009BD546 /* teamcity_messages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = teamcity_messages.h; sourceTree = "<group>"; };
+		BB6017EC1FD929F4009BD546 /* README.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.txt; sourceTree = "<group>"; };
+		BB6017ED1FD929F4009BD546 /* teamcity_messages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = teamcity_messages.cpp; sourceTree = "<group>"; };
+		BB6017F01FD92A5B009BD546 /* SimpleTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimpleTest.h; sourceTree = "<group>"; };
+		BB6017FC1FD92AF3009BD546 /* SpineEventMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpineEventMonitor.h; sourceTree = "<group>"; };
+		BB6017FD1FD92AF3009BD546 /* SpineEventMonitor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpineEventMonitor.cpp; sourceTree = "<group>"; };
+		BBFB507F1FDAF6CD005B22B6 /* MemoryTest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MemoryTest.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		BB60170C1FD9289A009BD546 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		BB6017061FD9289A009BD546 = {
+			isa = PBXGroup;
+			children = (
+				BB4E385C1FD9C87600709FF2 /* goblins-pro.json */,
+				BB4E385D1FD9C87700709FF2 /* goblins.atlas */,
+				BB4E38591FD9C86400709FF2 /* raptor-pro.json */,
+				BB4E38581FD9C86400709FF2 /* raptor.atlas */,
+				BB4E38541FD9C85600709FF2 /* spineboy-ess.json */,
+				BB4E38551FD9C85600709FF2 /* spineboy.atlas */,
+				BB6017F11FD92AF3009BD546 /* tests */,
+				BB6017E81FD929F4009BD546 /* teamcity */,
+				BB6017E41FD929D0009BD546 /* minicppunit */,
+				BB6017DD1FD928F6009BD546 /* memory */,
+				BB6017191FD928AC009BD546 /* spine-cpp */,
+				BB6017111FD9289A009BD546 /* spine_unit_test */,
+				BB6017101FD9289A009BD546 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		BB6017101FD9289A009BD546 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				BB60170F1FD9289A009BD546 /* spine_unit_test */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		BB6017111FD9289A009BD546 /* spine_unit_test */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017121FD9289A009BD546 /* main.cpp */,
+				BB6017F01FD92A5B009BD546 /* SimpleTest.h */,
+				BBFB507F1FDAF6CD005B22B6 /* MemoryTest.h */,
+			);
+			path = spine_unit_test;
+			sourceTree = "<group>";
+		};
+		BB6017191FD928AC009BD546 /* spine-cpp */ = {
+			isa = PBXGroup;
+			children = (
+				BB60171A1FD928AC009BD546 /* include */,
+				BB6017651FD928AC009BD546 /* src */,
+			);
+			name = "spine-cpp";
+			path = "../../spine-cpp";
+			sourceTree = "<group>";
+		};
+		BB60171A1FD928AC009BD546 /* include */ = {
+			isa = PBXGroup;
+			children = (
+				BB60171B1FD928AC009BD546 /* spine */,
+			);
+			path = include;
+			sourceTree = "<group>";
+		};
+		BB60171B1FD928AC009BD546 /* spine */ = {
+			isa = PBXGroup;
+			children = (
+				BB60171D1FD928AC009BD546 /* Animation.h */,
+				BB6017611FD928AC009BD546 /* AnimationState.h */,
+				BB6017401FD928AC009BD546 /* AnimationStateData.h */,
+				BB60172D1FD928AC009BD546 /* Atlas.h */,
+				BB6017631FD928AC009BD546 /* AtlasAttachmentLoader.h */,
+				BB6017391FD928AC009BD546 /* Attachment.h */,
+				BB60174A1FD928AC009BD546 /* AttachmentLoader.h */,
+				BB60174C1FD928AC009BD546 /* AttachmentTimeline.h */,
+				BB6017321FD928AC009BD546 /* AttachmentType.h */,
+				BB6017541FD928AC009BD546 /* BlendMode.h */,
+				BB60172C1FD928AC009BD546 /* Bone.h */,
+				BB60175F1FD928AC009BD546 /* BoneData.h */,
+				BB6017591FD928AC009BD546 /* BoundingBoxAttachment.h */,
+				BB6017341FD928AC009BD546 /* ClippingAttachment.h */,
+				BB6017431FD928AC009BD546 /* ColorTimeline.h */,
+				BB6017461FD928AC009BD546 /* Constraint.h */,
+				BB60174F1FD928AC009BD546 /* ContainerUtil.h */,
+				BB6017291FD928AC009BD546 /* CurveTimeline.h */,
+				BB60171C1FD928AC009BD546 /* DeformTimeline.h */,
+				BB60172E1FD928AC009BD546 /* DrawOrderTimeline.h */,
+				BB60172B1FD928AC009BD546 /* Event.h */,
+				BB60171E1FD928AC009BD546 /* EventData.h */,
+				BB6017641FD928AC009BD546 /* EventTimeline.h */,
+				BB6017531FD928AC009BD546 /* Extension.h */,
+				BB60173A1FD928AC009BD546 /* HashMap.h */,
+				BB6017581FD928AC009BD546 /* IkConstraint.h */,
+				BB60173E1FD928AC009BD546 /* IkConstraintData.h */,
+				BB6017301FD928AC009BD546 /* IkConstraintTimeline.h */,
+				BB6017491FD928AC009BD546 /* Json.h */,
+				BB6017471FD928AC009BD546 /* LinkedMesh.h */,
+				BB60175A1FD928AC009BD546 /* MathUtil.h */,
+				BB6017621FD928AC009BD546 /* MeshAttachment.h */,
+				BB6017281FD928AC009BD546 /* MixDirection.h */,
+				BB60173F1FD928AC009BD546 /* MixPose.h */,
+				BB6017271FD928AC009BD546 /* PathAttachment.h */,
+				BB6017551FD928AC009BD546 /* PathConstraint.h */,
+				BB6017501FD928AC009BD546 /* PathConstraintData.h */,
+				BB6017201FD928AC009BD546 /* PathConstraintMixTimeline.h */,
+				BB6017351FD928AC009BD546 /* PathConstraintPositionTimeline.h */,
+				BB6017561FD928AC009BD546 /* PathConstraintSpacingTimeline.h */,
+				BB60172A1FD928AC009BD546 /* PointAttachment.h */,
+				BB6017221FD928AC009BD546 /* Pool.h */,
+				BB6017251FD928AC009BD546 /* PositionMode.h */,
+				BB6017381FD928AC009BD546 /* RegionAttachment.h */,
+				BB6017331FD928AC009BD546 /* RotateMode.h */,
+				BB6017361FD928AC009BD546 /* RotateTimeline.h */,
+				BB6017261FD928AC009BD546 /* RTTI.h */,
+				BB6017571FD928AC009BD546 /* ScaleTimeline.h */,
+				BB6017481FD928AC009BD546 /* ShearTimeline.h */,
+				BB6017421FD928AC009BD546 /* Skeleton.h */,
+				BB60174D1FD928AC009BD546 /* SkeletonBinary.h */,
+				BB60175C1FD928AC009BD546 /* SkeletonBounds.h */,
+				BB6017211FD928AC009BD546 /* SkeletonClipping.h */,
+				BB60174E1FD928AC009BD546 /* SkeletonData.h */,
+				BB60173D1FD928AC009BD546 /* SkeletonJson.h */,
+				BB60174B1FD928AC009BD546 /* Skin.h */,
+				BB60175E1FD928AC009BD546 /* Slot.h */,
+				BB60171F1FD928AC009BD546 /* SlotData.h */,
+				BB6017441FD928AC009BD546 /* SpacingMode.h */,
+				BB6017241FD928AC009BD546 /* TextureLoader.h */,
+				BB60175D1FD928AC009BD546 /* Timeline.h */,
+				BB6017231FD928AC009BD546 /* TimelineType.h */,
+				BB60173B1FD928AC009BD546 /* TransformConstraint.h */,
+				BB6017521FD928AC009BD546 /* TransformConstraintData.h */,
+				BB60172F1FD928AC009BD546 /* TransformConstraintTimeline.h */,
+				BB60173C1FD928AC009BD546 /* TransformMode.h */,
+				BB6017601FD928AC009BD546 /* TranslateTimeline.h */,
+				BB6017371FD928AC009BD546 /* Triangulator.h */,
+				BB6017411FD928AC009BD546 /* TwoColorTimeline.h */,
+				BB6017511FD928AC009BD546 /* Updatable.h */,
+				BB60175B1FD928AC009BD546 /* Vector.h */,
+				BB6017311FD928AC009BD546 /* VertexAttachment.h */,
+				BB6017451FD928AC009BD546 /* Vertices.h */,
+			);
+			path = spine;
+			sourceTree = "<group>";
+		};
+		BB6017651FD928AC009BD546 /* src */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017661FD928AC009BD546 /* spine */,
+			);
+			path = src;
+			sourceTree = "<group>";
+		};
+		BB6017661FD928AC009BD546 /* spine */ = {
+			isa = PBXGroup;
+			children = (
+				BB60178A1FD928AC009BD546 /* Animation.cpp */,
+				BB6017951FD928AC009BD546 /* AnimationState.cpp */,
+				BB6017761FD928AC009BD546 /* AnimationStateData.cpp */,
+				BB6017801FD928AC009BD546 /* Atlas.cpp */,
+				BB60176D1FD928AC009BD546 /* AtlasAttachmentLoader.cpp */,
+				BB6017671FD928AC009BD546 /* Attachment.cpp */,
+				BB60178B1FD928AC009BD546 /* AttachmentLoader.cpp */,
+				BB60178D1FD928AC009BD546 /* AttachmentTimeline.cpp */,
+				BB60176C1FD928AC009BD546 /* Bone.cpp */,
+				BB6017971FD928AC009BD546 /* BoneData.cpp */,
+				BB6017781FD928AC009BD546 /* BoundingBoxAttachment.cpp */,
+				BB6017811FD928AC009BD546 /* ClippingAttachment.cpp */,
+				BB6017A11FD928AC009BD546 /* ColorTimeline.cpp */,
+				BB6017771FD928AC009BD546 /* Constraint.cpp */,
+				BB6017751FD928AC009BD546 /* CurveTimeline.cpp */,
+				BB6017891FD928AC009BD546 /* DeformTimeline.cpp */,
+				BB60178C1FD928AC009BD546 /* DrawOrderTimeline.cpp */,
+				BB6017991FD928AC009BD546 /* Event.cpp */,
+				BB60178E1FD928AC009BD546 /* EventData.cpp */,
+				BB60176E1FD928AC009BD546 /* EventTimeline.cpp */,
+				BB60176A1FD928AC009BD546 /* Extension.cpp */,
+				BB6017741FD928AC009BD546 /* IkConstraint.cpp */,
+				BB60177F1FD928AC009BD546 /* IkConstraintData.cpp */,
+				BB6017981FD928AC009BD546 /* IkConstraintTimeline.cpp */,
+				BB60179D1FD928AC009BD546 /* Json.cpp */,
+				BB6017861FD928AC009BD546 /* LinkedMesh.cpp */,
+				BB60177E1FD928AC009BD546 /* MathUtil.cpp */,
+				BB60177A1FD928AC009BD546 /* MeshAttachment.cpp */,
+				BB6017791FD928AC009BD546 /* PathAttachment.cpp */,
+				BB60176F1FD928AC009BD546 /* PathConstraint.cpp */,
+				BB6017821FD928AC009BD546 /* PathConstraintData.cpp */,
+				BB60179B1FD928AC009BD546 /* PathConstraintMixTimeline.cpp */,
+				BB6017901FD928AC009BD546 /* PathConstraintPositionTimeline.cpp */,
+				BB60178F1FD928AC009BD546 /* PathConstraintSpacingTimeline.cpp */,
+				BB6017871FD928AC009BD546 /* PointAttachment.cpp */,
+				BB6017881FD928AC009BD546 /* RegionAttachment.cpp */,
+				BB60179A1FD928AC009BD546 /* RotateTimeline.cpp */,
+				BB60177D1FD928AC009BD546 /* RTTI.cpp */,
+				BB6017851FD928AC009BD546 /* ScaleTimeline.cpp */,
+				BB6017A01FD928AC009BD546 /* ShearTimeline.cpp */,
+				BB6017681FD928AC009BD546 /* Skeleton.cpp */,
+				BB6017841FD928AC009BD546 /* SkeletonBinary.cpp */,
+				BB60179E1FD928AC009BD546 /* SkeletonBounds.cpp */,
+				BB6017921FD928AC009BD546 /* SkeletonClipping.cpp */,
+				BB6017721FD928AC009BD546 /* SkeletonData.cpp */,
+				BB6017961FD928AC009BD546 /* SkeletonJson.cpp */,
+				BB60177C1FD928AC009BD546 /* Skin.cpp */,
+				BB6017941FD928AC009BD546 /* Slot.cpp */,
+				BB60179F1FD928AC009BD546 /* SlotData.cpp */,
+				BB6017711FD928AC009BD546 /* TextureLoader.cpp */,
+				BB6017831FD928AC009BD546 /* Timeline.cpp */,
+				BB60177B1FD928AC009BD546 /* TransformConstraint.cpp */,
+				BB6017911FD928AC009BD546 /* TransformConstraintData.cpp */,
+				BB6017731FD928AC009BD546 /* TransformConstraintTimeline.cpp */,
+				BB6017691FD928AC009BD546 /* TranslateTimeline.cpp */,
+				BB60179C1FD928AC009BD546 /* Triangulator.cpp */,
+				BB6017931FD928AC009BD546 /* TwoColorTimeline.cpp */,
+				BB60176B1FD928AC009BD546 /* Updatable.cpp */,
+				BB6017701FD928AC009BD546 /* VertexAttachment.cpp */,
+			);
+			path = spine;
+			sourceTree = "<group>";
+		};
+		BB6017DD1FD928F6009BD546 /* memory */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017DE1FD928F6009BD546 /* KMemory.h */,
+				BB6017DF1FD928F6009BD546 /* KString.h */,
+				BB6017E01FD928F6009BD546 /* KMemory.cpp */,
+				BB6017E11FD928F6009BD546 /* KString.cpp */,
+			);
+			name = memory;
+			path = ../memory;
+			sourceTree = "<group>";
+		};
+		BB6017E41FD929D0009BD546 /* minicppunit */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017E51FD929D0009BD546 /* MiniCppUnit.hxx */,
+				BB6017E61FD929D0009BD546 /* MiniCppUnit.cxx */,
+			);
+			name = minicppunit;
+			path = ../minicppunit;
+			sourceTree = "<group>";
+		};
+		BB6017E81FD929F4009BD546 /* teamcity */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017E91FD929F4009BD546 /* teamcity_cppunit.h */,
+				BB6017EA1FD929F4009BD546 /* teamcity_cppunit.cpp */,
+				BB6017EB1FD929F4009BD546 /* teamcity_messages.h */,
+				BB6017EC1FD929F4009BD546 /* README.txt */,
+				BB6017ED1FD929F4009BD546 /* teamcity_messages.cpp */,
+			);
+			name = teamcity;
+			path = ../teamcity;
+			sourceTree = "<group>";
+		};
+		BB6017F11FD92AF3009BD546 /* tests */ = {
+			isa = PBXGroup;
+			children = (
+				BB6017FC1FD92AF3009BD546 /* SpineEventMonitor.h */,
+				BB6017FD1FD92AF3009BD546 /* SpineEventMonitor.cpp */,
+			);
+			name = tests;
+			path = ../tests;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		BB60170E1FD9289A009BD546 /* spine_unit_test */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = BB6017161FD9289A009BD546 /* Build configuration list for PBXNativeTarget "spine_unit_test" */;
+			buildPhases = (
+				BB60170B1FD9289A009BD546 /* Sources */,
+				BB60170C1FD9289A009BD546 /* Frameworks */,
+				BB60170D1FD9289A009BD546 /* CopyFiles */,
+				BB4E38471FD9C72600709FF2 /* CopyFiles */,
+				BB4E384A1FD9C79D00709FF2 /* CopyFiles */,
+				BB4E384B1FD9C79E00709FF2 /* CopyFiles */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = spine_unit_test;
+			productName = spine_unit_test;
+			productReference = BB60170F1FD9289A009BD546 /* spine_unit_test */;
+			productType = "com.apple.product-type.tool";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		BB6017071FD9289A009BD546 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0920;
+				ORGANIZATIONNAME = "Noctis Games";
+				TargetAttributes = {
+					BB60170E1FD9289A009BD546 = {
+						CreatedOnToolsVersion = 9.2;
+						ProvisioningStyle = Automatic;
+					};
+				};
+			};
+			buildConfigurationList = BB60170A1FD9289A009BD546 /* Build configuration list for PBXProject "spine_unit_test" */;
+			compatibilityVersion = "Xcode 8.0";
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+			);
+			mainGroup = BB6017061FD9289A009BD546;
+			productRefGroup = BB6017101FD9289A009BD546 /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				BB60170E1FD9289A009BD546 /* spine_unit_test */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+		BB60170B1FD9289A009BD546 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				BB6017CB1FD928AC009BD546 /* PathConstraintPositionTimeline.cpp in Sources */,
+				BB6017CD1FD928AC009BD546 /* SkeletonClipping.cpp in Sources */,
+				BB6017B51FD928AC009BD546 /* MeshAttachment.cpp in Sources */,
+				BB6017C01FD928AC009BD546 /* ScaleTimeline.cpp in Sources */,
+				BB6017D01FD928AC009BD546 /* AnimationState.cpp in Sources */,
+				BB6017A31FD928AC009BD546 /* Skeleton.cpp in Sources */,
+				BB6017BA1FD928AC009BD546 /* IkConstraintData.cpp in Sources */,
+				BB6017EE1FD929F4009BD546 /* teamcity_cppunit.cpp in Sources */,
+				BB6017CA1FD928AC009BD546 /* PathConstraintSpacingTimeline.cpp in Sources */,
+				BB6017C91FD928AC009BD546 /* EventData.cpp in Sources */,
+				BB6017B41FD928AC009BD546 /* PathAttachment.cpp in Sources */,
+				BB6017A91FD928AC009BD546 /* EventTimeline.cpp in Sources */,
+				BB6017A21FD928AC009BD546 /* Attachment.cpp in Sources */,
+				BB6017C81FD928AC009BD546 /* AttachmentTimeline.cpp in Sources */,
+				BB6017E21FD928F7009BD546 /* KMemory.cpp in Sources */,
+				BB6017E71FD929D0009BD546 /* MiniCppUnit.cxx in Sources */,
+				BB6017DA1FD928AC009BD546 /* SlotData.cpp in Sources */,
+				BB6017BE1FD928AC009BD546 /* Timeline.cpp in Sources */,
+				BB6017BF1FD928AC009BD546 /* SkeletonBinary.cpp in Sources */,
+				BB6017131FD9289A009BD546 /* main.cpp in Sources */,
+				BB6017B21FD928AC009BD546 /* Constraint.cpp in Sources */,
+				BB6017A41FD928AC009BD546 /* TranslateTimeline.cpp in Sources */,
+				BB6017A71FD928AC009BD546 /* Bone.cpp in Sources */,
+				BB6017DC1FD928AC009BD546 /* ColorTimeline.cpp in Sources */,
+				BB6017AE1FD928AC009BD546 /* TransformConstraintTimeline.cpp in Sources */,
+				BB6017BB1FD928AC009BD546 /* Atlas.cpp in Sources */,
+				BB6017C21FD928AC009BD546 /* PointAttachment.cpp in Sources */,
+				BB6017C11FD928AC009BD546 /* LinkedMesh.cpp in Sources */,
+				BB6017A61FD928AC009BD546 /* Updatable.cpp in Sources */,
+				BB6017DB1FD928AC009BD546 /* ShearTimeline.cpp in Sources */,
+				BB6017C31FD928AC009BD546 /* RegionAttachment.cpp in Sources */,
+				BB6017D71FD928AC009BD546 /* Triangulator.cpp in Sources */,
+				BB6017EF1FD929F4009BD546 /* teamcity_messages.cpp in Sources */,
+				BB6017D61FD928AC009BD546 /* PathConstraintMixTimeline.cpp in Sources */,
+				BB6017CC1FD928AC009BD546 /* TransformConstraintData.cpp in Sources */,
+				BB6017C71FD928AC009BD546 /* DrawOrderTimeline.cpp in Sources */,
+				BB6017B61FD928AC009BD546 /* TransformConstraint.cpp in Sources */,
+				BB6017BC1FD928AC009BD546 /* ClippingAttachment.cpp in Sources */,
+				BB6017B81FD928AC009BD546 /* RTTI.cpp in Sources */,
+				BB6017A51FD928AC009BD546 /* Extension.cpp in Sources */,
+				BB6017C41FD928AC009BD546 /* DeformTimeline.cpp in Sources */,
+				BB6017A81FD928AC009BD546 /* AtlasAttachmentLoader.cpp in Sources */,
+				BB6017AA1FD928AC009BD546 /* PathConstraint.cpp in Sources */,
+				BB6017B71FD928AC009BD546 /* Skin.cpp in Sources */,
+				BB6017D21FD928AC009BD546 /* BoneData.cpp in Sources */,
+				BB6017C61FD928AC009BD546 /* AttachmentLoader.cpp in Sources */,
+				BB6017CF1FD928AC009BD546 /* Slot.cpp in Sources */,
+				BB6017B91FD928AC009BD546 /* MathUtil.cpp in Sources */,
+				BB6017B11FD928AC009BD546 /* AnimationStateData.cpp in Sources */,
+				BB6018081FD92AF4009BD546 /* SpineEventMonitor.cpp in Sources */,
+				BB6017E31FD928F7009BD546 /* KString.cpp in Sources */,
+				BB6017D41FD928AC009BD546 /* Event.cpp in Sources */,
+				BB6017D81FD928AC009BD546 /* Json.cpp in Sources */,
+				BB6017CE1FD928AC009BD546 /* TwoColorTimeline.cpp in Sources */,
+				BB6017AD1FD928AC009BD546 /* SkeletonData.cpp in Sources */,
+				BB6017D11FD928AC009BD546 /* SkeletonJson.cpp in Sources */,
+				BB6017D31FD928AC009BD546 /* IkConstraintTimeline.cpp in Sources */,
+				BB6017AF1FD928AC009BD546 /* IkConstraint.cpp in Sources */,
+				BB6017AC1FD928AC009BD546 /* TextureLoader.cpp in Sources */,
+				BB6017C51FD928AC009BD546 /* Animation.cpp in Sources */,
+				BB6017B01FD928AC009BD546 /* CurveTimeline.cpp in Sources */,
+				BB6017BD1FD928AC009BD546 /* PathConstraintData.cpp in Sources */,
+				BB6017D91FD928AC009BD546 /* SkeletonBounds.cpp in Sources */,
+				BB6017B31FD928AC009BD546 /* BoundingBoxAttachment.cpp in Sources */,
+				BB6017D51FD928AC009BD546 /* RotateTimeline.cpp in Sources */,
+				BB6017AB1FD928AC009BD546 /* VertexAttachment.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		BB6017141FD9289A009BD546 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "-";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.13;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+			};
+			name = Debug;
+		};
+		BB6017151FD9289A009BD546 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				CODE_SIGN_IDENTITY = "-";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu11;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.13;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = macosx;
+			};
+			name = Release;
+		};
+		BB6017171FD9289A009BD546 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../spine-cpp/include\"";
+				OTHER_LDFLAGS = "-DKANJI_MEMTRACE";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Debug;
+		};
+		BB6017181FD9289A009BD546 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CODE_SIGN_STYLE = Automatic;
+				HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../spine-cpp/include\"";
+				OTHER_LDFLAGS = "-DKANJI_MEMTRACE";
+				PRODUCT_NAME = "$(TARGET_NAME)";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		BB60170A1FD9289A009BD546 /* Build configuration list for PBXProject "spine_unit_test" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BB6017141FD9289A009BD546 /* Debug */,
+				BB6017151FD9289A009BD546 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		BB6017161FD9289A009BD546 /* Build configuration list for PBXNativeTarget "spine_unit_test" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				BB6017171FD9289A009BD546 /* Debug */,
+				BB6017181FD9289A009BD546 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = BB6017071FD9289A009BD546 /* Project object */;
+}

+ 7 - 0
spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:spine_unit_test.xcodeproj">
+   </FileRef>
+</Workspace>

+ 444 - 0
spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/MemoryTest.h

@@ -0,0 +1,444 @@
+//
+//  MemoryTest.h
+//  spine_unit_test
+//
+//  Created by Stephen Gowen on 12/8/17.
+//  Copyright © 2017 Noctis Games. All rights reserved.
+//
+
+#ifndef MemoryTest_h
+#define MemoryTest_h
+
+#include "SpineEventMonitor.h"
+
+#include <spine/SkeletonJson.h>
+#include <spine/SkeletonData.h>
+#include <spine/Atlas.h>
+#include <spine/AnimationStateData.h>
+#include <spine/Skeleton.h>
+#include <spine/AnimationState.h>
+#include <spine/Animation.h>
+
+#include <vector>
+#include <spine/Extension.h>
+#include <spine/TextureLoader.h>
+#include <spine/Vector.h>
+
+#include <spine/CurveTimeline.h>
+#include <spine/VertexAttachment.h>
+#include <spine/Json.h>
+
+#include <spine/AttachmentLoader.h>
+#include <spine/AtlasAttachmentLoader.h>
+#include <spine/LinkedMesh.h>
+#include <spine/Triangulator.h>
+#include <spine/SkeletonClipping.h>
+#include <spine/BoneData.h>
+#include <spine/Bone.h>
+#include <spine/SlotData.h>
+#include <spine/Slot.h>
+#include <spine/ClippingAttachment.h>
+
+#include <new>
+
+#include "KMemory.h" // last include
+
+#define SPINEBOY_JSON "testdata/spineboy/spineboy-ess.json"
+#define SPINEBOY_ATLAS "testdata/spineboy/spineboy.atlas"
+
+#define MAX_RUN_TIME 6000 // equal to about 100 seconds of execution
+
+namespace Spine
+{
+    class MemoryTest
+    {
+    public:
+        class MyTextureLoader : public TextureLoader
+        {
+            virtual void load(AtlasPage& page, std::string path)
+            {
+                page.rendererObject = NULL;
+                page.width = 2048;
+                page.height = 2048;
+            }
+            
+            virtual void unload(void* texture)
+            {
+                // TODO
+            }
+        };
+        
+        //////////////////////////////////////////////////////////////////////////
+        // Helper methods        
+        static SkeletonData* readSkeletonJsonData(const char* filename, Atlas* atlas)
+        {
+            Vector<Atlas*> atlasArray;
+            atlasArray.push_back(atlas);
+            
+            SkeletonJson* skeletonJson = NEW(SkeletonJson);
+            new (skeletonJson) SkeletonJson(atlasArray);
+            assert(skeletonJson != 0);
+            
+            SkeletonData* skeletonData = skeletonJson->readSkeletonDataFile(filename);
+            assert(skeletonData != 0);
+            
+            DESTROY(SkeletonJson, skeletonJson);
+            
+            return skeletonData;
+        }
+        
+        static void loadSpineboyExample(Atlas* &atlas, SkeletonData* &skeletonData, AnimationStateData* &stateData, Skeleton* &skeleton, AnimationState* &state)
+        {
+            ///////////////////////////////////////////////////////////////////////////
+            // Global Animation Information
+            static MyTextureLoader myTextureLoader;
+            atlas = NEW(Atlas);
+            new (atlas) Atlas(SPINEBOY_ATLAS, myTextureLoader);
+            assert(atlas != 0);
+            
+            skeletonData = readSkeletonJsonData(SPINEBOY_JSON, atlas);
+            assert(skeletonData != 0);
+            
+            stateData = NEW(AnimationStateData);
+            new (stateData) AnimationStateData(*skeletonData);
+            assert(stateData != 0);
+            stateData->setDefaultMix(0.2f); // force mixing
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Animation Instance
+            skeleton = NEW(Skeleton);
+            new (skeleton) Skeleton(*skeletonData);
+            assert(skeleton != 0);
+            
+            state = NEW(AnimationState);
+            new (state) AnimationState(*stateData);
+            assert(state != 0);
+        }
+        
+        static void disposeAll(Skeleton* skeleton, AnimationState* state, AnimationStateData* stateData, SkeletonData* skeletonData, Atlas* atlas)
+        {
+            ///////////////////////////////////////////////////////////////////////////
+            // Dispose Instance
+            DESTROY(Skeleton, skeleton);
+            DESTROY(AnimationState, state);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Dispose Global
+            DESTROY(AnimationStateData, stateData);
+            DESTROY(SkeletonData, skeletonData);
+            DESTROY(Atlas, atlas);
+        }
+        
+        //////////////////////////////////////////////////////////////////////////
+        // Reproduce Memory leak as described in Issue #776
+        // https://github.com/EsotericSoftware/spine-runtimes/issues/776
+        static void reproduceIssue_776()
+        {
+            Atlas* atlas = NULL;
+            SkeletonData* skeletonData = NULL;
+            AnimationStateData* stateData = NULL;
+            Skeleton* skeleton = NULL;
+            AnimationState* state = NULL;
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Initialize Animations
+            loadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Run animation
+            skeleton->setToSetupPose();
+            InterruptMonitor eventMonitor(state);
+            
+            // Interrupt the animation on this specific sequence of spEventType(s)
+            eventMonitor
+            .AddInterruptEvent(EventType_Interrupt, "jump")
+            .AddInterruptEvent(EventType_Start);
+            
+            state->setAnimation(0, "walk", true);
+            state->addAnimation(0, "jump", false, 0.0f);
+            state->addAnimation(0, "run",  true,  0.0f);
+            state->addAnimation(0, "jump", false, 3.0f);
+            state->addAnimation(0, "walk", true,  0.0f);
+            state->addAnimation(0, "idle", false, 1.0f);
+            
+            for (int i = 0; i < MAX_RUN_TIME && eventMonitor.isAnimationPlaying(); ++i)
+            {
+                const float timeSlice = 1.0f / 60.0f;
+                skeleton->update(timeSlice);
+                state->update(timeSlice);
+                state->apply(*skeleton);
+            }
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Cleanup Animations
+            disposeAll(skeleton, state, stateData, skeletonData, atlas);
+        }
+        
+        static void reproduceIssue_777()
+        {
+            Atlas* atlas = NULL;
+            SkeletonData* skeletonData = NULL;
+            AnimationStateData* stateData = NULL;
+            Skeleton* skeleton = NULL;
+            AnimationState* state = NULL;
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Initialize Animations
+            loadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Run animation
+            skeleton->setToSetupPose();
+            SpineEventMonitor eventMonitor(state);
+            
+            // Set Animation and Play for 5 frames
+            state->setAnimation(0, "walk", true);
+            for (int i = 0; i < 5; ++i)
+            {
+                const float timeSlice = 1.0f / 60.0f;
+                skeleton->update(timeSlice);
+                state->update(timeSlice);
+                state->apply(*skeleton);
+            }
+            
+            // Change animation twice in a row
+            state->setAnimation(0, "walk", false);
+            state->setAnimation(0, "run", false);
+            
+            // run normal update
+            for (int i = 0; i < 5; ++i)
+            {
+                const float timeSlice = 1.0f / 60.0f;
+                skeleton->update(timeSlice);
+                state->update(timeSlice);
+                state->apply(*skeleton);
+            }
+            
+            // Now we'd lose mixingFrom (the first "walk" entry we set above) and should leak
+            state->setAnimation(0, "run", false);
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Cleanup Animations
+            disposeAll(skeleton, state, stateData, skeletonData, atlas);
+        }
+        
+        static void spineAnimStateHandler(AnimationState* state, EventType type, TrackEntry* entry, Event* event)
+        {
+            if (type == EventType_Complete)
+            {
+                state->setAnimation(0, "walk", false);
+                state->update(0);
+                state->apply(*skeleton);
+            }
+        }
+        
+        static void reproduceIssue_Loop()
+        {
+            Atlas* atlas = NULL;
+            SkeletonData* skeletonData = NULL;
+            AnimationStateData* stateData = NULL;
+            AnimationState* state = NULL;
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Initialize Animations
+            loadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            
+            if (state)
+            {
+                state->setOnAnimationEventFunc(spineAnimStateHandler);
+            }
+            
+            state->setAnimation(0, "walk", false);
+            
+            // run normal update
+            for (int i = 0; i < 50; ++i)
+            {
+                const float timeSlice = 1.0f / 60.0f;
+                skeleton->update(timeSlice);
+                state->update(timeSlice);
+                state->apply(*skeleton);
+            }
+            
+            disposeAll(skeleton, state, stateData, skeletonData, atlas);
+        }
+        
+        static void triangulator()
+        {
+            Triangulator* triangulator = NEW(Triangulator);
+            new (triangulator) Triangulator();
+            
+            Vector<float> polygon;
+            polygon.reserve(16);
+            polygon.push_back(0);
+            polygon.push_back(0);
+            polygon.push_back(100);
+            polygon.push_back(0);
+            polygon.push_back(100);
+            polygon.push_back(100);
+            polygon.push_back(0);
+            polygon.push_back(100);
+            
+            Vector<int> triangles = triangulator->triangulate(polygon);
+            assert(triangles.size() == 6);
+            assert(triangles[0] == 3);
+            assert(triangles[1] == 0);
+            assert(triangles[2] == 1);
+            assert(triangles[3] == 3);
+            assert(triangles[4] == 1);
+            assert(triangles[5] == 2);
+            
+            Vector< Vector<float> *> polys = triangulator->decompose(polygon, triangles);
+            assert(polys.size() == 1);
+            assert(polys[0]->size() == 8);
+            
+            assert(polys[0]->operator[](0) == 0);
+            assert(polys[0]->operator[](1) == 100);
+            assert(polys[0]->operator[](2) == 0);
+            assert(polys[0]->operator[](3) == 0);
+            assert(polys[0]->operator[](4) == 100);
+            assert(polys[0]->operator[](5) == 0);
+            assert(polys[0]->operator[](6) == 100);
+            assert(polys[0]->operator[](7) == 100);
+            
+            DESTROY(Triangulator, triangulator);
+        }
+        
+        static void skeletonClipper()
+        {
+            Atlas* atlas = NULL;
+            SkeletonData* skeletonData = NULL;
+            AnimationStateData* stateData = NULL;
+            Skeleton* skeleton = NULL;
+            AnimationState* state = NULL;
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Initialize Animations
+            loadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+            
+            SkeletonClipping* clipping = NEW(SkeletonClipping);
+            new (clipping) SkeletonClipping();
+            
+            BoneData* boneData = NEW(BoneData);
+            new (boneData) BoneData(0, "bone", 0);
+            
+            Bone* bone = NEW(Bone);
+            new(bone) Bone(*boneData, *skeleton, NULL);
+            
+            bone->setA(1);
+            bone->setB(0);
+            bone->setC(0);
+            bone->setD(1);
+            bone->setWorldX(0);
+            bone->setWorldY(0);
+            
+            SlotData* slotData = NEW(SlotData);
+            new (slotData) SlotData(0, "slot", *boneData);
+            
+            Slot* slot = NEW(Slot);
+            new(slot) Slot(*slotData, *bone);
+            
+            ClippingAttachment* clip = NEW(ClippingAttachment);
+            new(clip) ClippingAttachment("clipping");
+            
+            clip->setEndSlot(slotData);
+            clip->setWorldVerticesLength(4 * 2);
+            
+            Vector<float> clipVertices;
+            clipVertices.reserve(8);
+            clipVertices.setSize(8);
+            
+            clip->setVertices(clipVertices);
+            clip->getVertices()[0] = 0;
+            clip->getVertices()[1] = 50;
+            clip->getVertices()[2] = 100;
+            clip->getVertices()[3] = 50;
+            clip->getVertices()[4] = 100;
+            clip->getVertices()[5] = 70;
+            clip->getVertices()[6] = 0;
+            clip->getVertices()[7] = 70;
+            
+            clipping->clipStart(*slot, clip);
+            
+            Vector<float> vertices;
+            vertices.reserve(16);
+            vertices.push_back(0);
+            vertices.push_back(0);
+            vertices.push_back(100);
+            vertices.push_back(0);
+            vertices.push_back(50);
+            vertices.push_back(150);
+            
+            Vector<float> uvs;
+            uvs.reserve(16);
+            uvs.push_back(0);
+            uvs.push_back(0);
+            uvs.push_back(1);
+            uvs.push_back(0);
+            uvs.push_back(0.5f);
+            uvs.push_back(1);
+            
+            Vector<int> indices;
+            indices.reserve(16);
+            indices.push_back(0);
+            indices.push_back(1);
+            indices.push_back(2);
+            
+            clipping->clipTriangles(vertices, static_cast<int>(vertices.size()), indices, static_cast<int>(indices.size()), uvs);
+            
+            float expectedVertices[8] = { 83.333328, 50.000000, 76.666664, 70.000000, 23.333334, 70.000000, 16.666672, 50.000000 };
+            assert(clipping->getClippedVertices().size() == 8);
+            for (int i = 0; i < clipping->getClippedVertices().size(); i++)
+            {
+                assert(abs(clipping->getClippedVertices()[i] - expectedVertices[i]) < 0.001);
+            }
+            
+            float expectedUVs[8] = { 0.833333f, 0.333333, 0.766667, 0.466667, 0.233333, 0.466667, 0.166667, 0.333333 };
+            assert(clipping->getClippedUVs().size() == 8);
+            for (int i = 0; i < clipping->getClippedUVs().size(); i++)
+            {
+                assert(abs(clipping->getClippedUVs()[i] - expectedUVs[i]) < 0.001);
+            }
+            
+            short expectedIndices[6] = { 0, 1, 2, 0, 2, 3 };
+            assert(clipping->getClippedTriangles().size() == 6);
+            for (int i = 0; i < clipping->getClippedTriangles().size(); i++)
+            {
+                assert(clipping->getClippedTriangles()[i] == expectedIndices[i]);
+            }
+            
+            DESTROY(SlotData, slotData);
+            DESTROY(Slot, slot);
+            DESTROY(BoneData, boneData);
+            DESTROY(Bone, bone);
+            DESTROY(ClippingAttachment, clip);
+            DESTROY(SkeletonClipping, clipping);
+            
+            //////////////////////////////////////////////////////////////////////////
+            // Cleanup Animations
+            disposeAll(skeleton, state, stateData, skeletonData, atlas);
+        }
+        
+        static void test()
+        {
+            reproduceIssue_776();
+            reproduceIssue_777();
+            reproduceIssue_Loop();
+            triangulator();
+            skeletonClipper();
+        }
+        
+    private:
+        static Skeleton* skeleton;
+        
+        // ctor, copy ctor, and assignment should be private in a Singleton
+        MemoryTest();
+        MemoryTest(const MemoryTest&);
+        MemoryTest& operator=(const MemoryTest&);
+    };
+}
+
+Skeleton* MemoryTest::skeleton = NULL;
+
+#endif /* MemoryTest_h */

+ 197 - 0
spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/SimpleTest.h

@@ -0,0 +1,197 @@
+//
+//  SimpleTest.h
+//  spine_unit_test
+//
+//  Created by Stephen Gowen on 11/9/17.
+//  Copyright © 2017 Noctis Games. All rights reserved.
+//
+
+#ifndef SimpleTest_h
+#define SimpleTest_h
+
+#include "SpineEventMonitor.h"
+
+#include <spine/SkeletonJson.h>
+#include <spine/SkeletonData.h>
+#include <spine/Atlas.h>
+#include <spine/AnimationStateData.h>
+#include <spine/Skeleton.h>
+#include <spine/AnimationState.h>
+#include <spine/Animation.h>
+
+#include <vector>
+#include <spine/Extension.h>
+#include <spine/TextureLoader.h>
+#include <spine/Vector.h>
+
+#include <spine/CurveTimeline.h>
+#include <spine/VertexAttachment.h>
+#include <spine/Json.h>
+
+#include <spine/AttachmentLoader.h>
+#include <spine/AtlasAttachmentLoader.h>
+#include <spine/LinkedMesh.h>
+
+#include <new>
+
+#include "KMemory.h" // last include
+
+#define SPINEBOY_JSON "testdata/spineboy/spineboy-ess.json"
+#define SPINEBOY_ATLAS "testdata/spineboy/spineboy.atlas"
+
+#define RAPTOR_JSON "testdata/raptor/raptor-pro.json"
+#define RAPTOR_ATLAS "testdata/raptor/raptor.atlas"
+
+#define GOBLINS_JSON "testdata/goblins/goblins-pro.json"
+#define GOBLINS_ATLAS "testdata/goblins/goblins.atlas"
+
+#define MAX_RUN_TIME 6000 // equal to about 100 seconds of execution
+
+namespace Spine
+{
+    class SimpleTest
+    {
+    public:
+        static SkeletonData* readSkeletonJsonData(const char* filename, Atlas* atlas)
+        {
+            Vector<Atlas*> atlasArray;
+            atlasArray.push_back(atlas);
+            
+            SkeletonJson* skeletonJson = NEW(SkeletonJson);
+            new (skeletonJson) SkeletonJson(atlasArray);
+            assert(skeletonJson != 0);
+            
+            SkeletonData* skeletonData = skeletonJson->readSkeletonDataFile(filename);
+            assert(skeletonData != 0);
+            
+            DESTROY(SkeletonJson, skeletonJson);
+            
+            return skeletonData;
+        }
+        
+        typedef std::vector<std::string> AnimList;
+        
+        static size_t enumerateAnimations(AnimList& outList, SkeletonData* skeletonData)
+        {
+            if (skeletonData)
+            {
+                for (int n = 0; n < skeletonData->getAnimations().size(); n++)
+                {
+                    outList.push_back(skeletonData->getAnimations()[n]->getName());
+                }
+            }
+            
+            return outList.size();
+        }
+        
+        class MyTextureLoader : public TextureLoader
+        {
+            virtual void load(AtlasPage& page, std::string path)
+            {
+                page.rendererObject = NULL;
+                page.width = 2048;
+                page.height = 2048;
+            }
+            
+            virtual void unload(void* texture)
+            {
+                // TODO
+            }
+        };
+        
+        static void testRunner(const char* jsonName, const char* atlasName)
+        {
+            ///////////////////////////////////////////////////////////////////////////
+            // Global Animation Information
+            MyTextureLoader myTextureLoader;
+            Atlas* atlas = NEW(Atlas);
+            new (atlas) Atlas(atlasName, myTextureLoader);
+            assert(atlas != 0);
+            
+            SkeletonData* skeletonData = readSkeletonJsonData(jsonName, atlas);
+            assert(skeletonData != 0);
+            
+            AnimationStateData* stateData = NEW(AnimationStateData);
+            new (stateData) AnimationStateData(*skeletonData);
+            assert(stateData != 0);
+            stateData->setDefaultMix(0.2f); // force mixing
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Animation Instance
+            Skeleton* skeleton = NEW(Skeleton);
+            new (skeleton) Skeleton(*skeletonData);
+            assert(skeleton != 0);
+            
+            AnimationState* state = NEW(AnimationState);
+            new (state) AnimationState(*stateData);
+            assert(state != 0);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Run animation
+            skeleton->setToSetupPose();
+            SpineEventMonitor eventMonitor(state);
+            
+            AnimList anims; // Let's chain all the animations together as a test
+            size_t count = enumerateAnimations(anims, skeletonData);
+            if (count > 0)
+            {
+                state->setAnimation(0, anims[0].c_str(), false);
+            }
+            
+            for (size_t i = 1; i < count; ++i)
+            {
+                state->addAnimation(0, anims[i].c_str(), false, 0.0f);
+            }
+            
+            // Run Loop
+            for (int i = 0; i < MAX_RUN_TIME && eventMonitor.isAnimationPlaying(); ++i)
+            {
+                const float timeSlice = 1.0f / 60.0f;
+                skeleton->update(timeSlice);
+                state->update(timeSlice);
+                state->apply(*skeleton);
+            }
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Dispose Instance
+            DESTROY(Skeleton, skeleton);
+            DESTROY(AnimationState, state);
+            
+            ///////////////////////////////////////////////////////////////////////////
+            // Dispose Global
+            DESTROY(AnimationStateData, stateData);
+            DESTROY(SkeletonData, skeletonData);
+            DESTROY(Atlas, atlas);
+        }
+        
+        static void spineboyTestCase()
+        {
+            testRunner(SPINEBOY_JSON, SPINEBOY_ATLAS);
+        }
+        
+        static void raptorTestCase()
+        {
+            testRunner(RAPTOR_JSON, RAPTOR_ATLAS);
+        }
+        
+        static void goblinsTestCase()
+        {
+            testRunner(GOBLINS_JSON, GOBLINS_ATLAS);
+        }
+        
+        static void test()
+        {
+            spineboyTestCase();
+            raptorTestCase();
+            goblinsTestCase();
+        }
+        
+    private:
+        // ctor, copy ctor, and assignment should be private in a Singleton
+        SimpleTest();
+        SimpleTest(const SimpleTest&);
+        SimpleTest& operator=(const SimpleTest&);
+    };
+}
+
+#endif /* SimpleTest_h */

+ 119 - 0
spine-cpp/spine-cpp-unit-tests/spine_unit_test/spine_unit_test/main.cpp

@@ -0,0 +1,119 @@
+//
+//  main.cpp
+//  spine_unit_test
+//
+//  Created by Stephen Gowen on 12/7/17.
+//  Copyright © 2017 Noctis Games. All rights reserved.
+//
+
+#ifdef WIN32
+#include <direct.h>
+#else
+#include <unistd.h>
+#endif // WIN32
+
+#include <ctime>
+#include "KString.h"
+#include <stdio.h>
+
+#include "spine/Extension.h"
+
+#include "SimpleTest.h"
+#include "MemoryTest.h"
+
+#include "KMemory.h" // last include
+
+using namespace Spine;
+
+class KanjiSpineExtension : public DefaultSpineExtension
+{
+public:
+    static KanjiSpineExtension* getInstance();
+    
+    virtual ~KanjiSpineExtension();
+    
+    virtual void* spineAlloc(size_t size, const char* file, int line);
+    
+    virtual void* spineCalloc(size_t num, size_t size, const char* file, int line);
+    
+    virtual void* spineRealloc(void* ptr, size_t size, const char* file, int line);
+    
+    virtual void spineFree(void* mem);
+    
+protected:
+    KanjiSpineExtension();
+};
+
+KanjiSpineExtension* KanjiSpineExtension::getInstance()
+{
+    static KanjiSpineExtension ret;
+    return &ret;
+}
+
+KanjiSpineExtension::~KanjiSpineExtension()
+{
+    // Empty
+}
+
+void* KanjiSpineExtension::spineAlloc(size_t size, const char* file, int line)
+{
+    return _kanjimalloc(size);
+}
+
+void* KanjiSpineExtension::spineCalloc(size_t num, size_t size, const char* file, int line)
+{
+    void* ptr = spineAlloc(num * size, file, line);
+    if (ptr)
+    {
+        memset(ptr, 0, num * size);
+    }
+    
+    return ptr;
+}
+
+void* KanjiSpineExtension::spineRealloc(void* ptr, size_t size, const char* file, int line)
+{
+    return _kanjirealloc(ptr, size);
+}
+
+void KanjiSpineExtension::spineFree(void* mem)
+{
+    _kanjifree(mem);
+}
+
+KanjiSpineExtension::KanjiSpineExtension() : DefaultSpineExtension()
+{
+    // Empty
+}
+
+double timeNow()
+{
+    timespec lTimeVal;
+    clock_gettime(CLOCK_MONOTONIC, &lTimeVal);
+    return lTimeVal.tv_sec + (lTimeVal.tv_nsec * 1.0e-9);
+}
+
+int main(int argc, char* argv[])
+{
+    SpineExtension::setInstance(KanjiSpineExtension::getInstance());
+    
+    double startTime = timeNow();
+    
+    /* Set working directory to current location for opening test data */
+#ifdef WIN32
+    _chdir( GetFileDir(argv[0], false).c_str() );
+#else
+    chdir(GetFileDir(argv[0], false).c_str());
+#endif
+    
+    SimpleTest::test();
+    MemoryTest::test();
+    
+    // End Timing
+    double endTime = timeNow();
+    double timeElapsed = (endTime - startTime);
+    printf("\n\n%i minutes and %i seconds of your life taken from you by these tests.\n", ((int)timeElapsed) / 60, ((int)timeElapsed) % 60);
+    printf("timeElapsed: %f \n", timeElapsed);
+    
+    return 0;
+}

+ 30 - 0
spine-cpp/spine-cpp-unit-tests/teamcity/README.txt

@@ -0,0 +1,30 @@
+CppUnit listener for TeamCity
+-----------------------------
+
+To report your tests result to TeamCity server
+include teamcity_messages.* teamcity_cppunit.*
+to your project and modify "main" function
+as shown in example.cpp
+(around JetBrains::underTeamcity and JetBrains::TeamcityProgressListener)
+
+Technical details
+-----------------
+
+Reporting implemented by writing TeamCity service messages to stdout.
+
+See
+http://www.jetbrains.net/confluence/display/TCD3/Build+Script+Interaction+with+TeamCity
+for more details.
+
+Contact information
+-------------------
+
+Mail to [email protected] or see other options at
+
+http://www.jetbrains.com/support/teamcity
+
+License
+-------
+
+Apache, version 2.0
+http://www.apache.org/licenses/LICENSE-2.0

+ 82 - 0
spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_cppunit.cpp

@@ -0,0 +1,82 @@
+/* Copyright 2011 JetBrains s.r.o.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ * $Revision: 88625 $
+*/
+
+#include <sstream>
+
+#include "teamcity_cppunit.h"
+
+using namespace std;
+
+namespace JetBrains {
+
+TeamcityProgressListener::TeamcityProgressListener()
+{
+    flowid = getFlowIdFromEnvironment();
+}
+
+TeamcityProgressListener::TeamcityProgressListener(const std::string& _flowid)
+{
+    flowid = _flowid;
+}
+
+void TeamcityProgressListener::startTest(const std::string& test) {
+    messages.testStarted(test, flowid);
+}
+
+static string sourceLine2string(const SourceLine &sline) {
+    stringstream ss;
+        
+    ss << sline.fileName << ":" << sline.lineNumber;
+    
+    return ss.str();
+}
+
+void TeamcityProgressListener::addFailure(const TestFailure &failure) 
+{
+  
+    string details = failure.details;
+    
+    if (failure.sourceLine.isValid()) {
+        details.append(" at ");
+        details.append(sourceLine2string(failure.sourceLine));
+        details.append("\n");
+    }
+    
+    messages.testFailed(
+        failure.testName,
+        failure.description,
+        details,
+        flowid
+    );
+}
+
+void TeamcityProgressListener::endTest(const std::string& test) 
+{
+    messages.testFinished(test, -1, flowid);
+}
+
+void TeamcityProgressListener::startSuite(const std::string& test) 
+{
+    messages.suiteStarted(test, flowid);
+}
+
+void TeamcityProgressListener::endSuite(const std::string& test) 
+{
+    messages.suiteFinished(test, flowid);
+}
+
+}

+ 83 - 0
spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_cppunit.h

@@ -0,0 +1,83 @@
+/* Copyright 2011 JetBrains s.r.o.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Revision: 88625 $
+*/
+
+#pragma once
+
+#include <string>
+
+#include "teamcity_messages.h"
+
+namespace JetBrains {
+
+	class SourceLine
+	{
+	public:
+		SourceLine():lineNumber(-1){}
+		SourceLine(const std::string& theFile, int theLineNum):fileName(theFile),lineNumber(theLineNum){}
+		~SourceLine(){}
+
+		std::string fileName;
+		int lineNumber;
+		bool isValid() const {return (!fileName.empty() && lineNumber > -1);}
+	};
+
+	class TestFailure
+	{
+	public:
+		std::string details;
+		SourceLine sourceLine;
+		std::string testName;
+		std::string description;
+	public:
+		TestFailure(){}
+		~TestFailure(){}
+
+		TestFailure(const std::string& theTestName, const std::string& theDetails, SourceLine theSourcelLine, const std::string& theDescription)
+		{
+			testName = theTestName;
+			details = theDetails;
+			sourceLine = theSourcelLine;
+			description = theDescription;
+		}
+	};
+
+	class TeamcityProgressListener 
+	{
+	public:
+		TeamcityMessages messages;
+	public:
+		TeamcityProgressListener(const std::string& _flowid);
+		TeamcityProgressListener();
+		~TeamcityProgressListener(){}
+
+		void startTest(const std::string& test);
+		void addFailure(const TestFailure &failure);
+		void endTest(const std::string& test);
+		void startSuite(const std::string& test);
+		void endSuite(const std::string& test);
+    
+	private:
+		std::string flowid;
+
+		// Prevents the use of the copy constructor.
+		TeamcityProgressListener(const TeamcityProgressListener &copy);
+
+		// Prevents the use of the copy operator.
+		void operator =(const TeamcityProgressListener &copy);
+	};
+
+}

+ 174 - 0
spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_messages.cpp

@@ -0,0 +1,174 @@
+/* Copyright 2011 JetBrains s.r.o.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Revision: 88625 $
+*/
+
+#include <stdlib.h>
+#include <sstream>
+
+#include "teamcity_messages.h"
+
+using namespace std;
+
+namespace JetBrains {
+
+std::string getFlowIdFromEnvironment() {
+    const char *flowId = getenv("TEAMCITY_PROCESS_FLOW_ID");
+    return flowId == NULL ? "" : flowId;
+}
+
+bool underTeamcity() {
+    return getenv("TEAMCITY_PROJECT_NAME") != NULL;
+}
+
+TeamcityMessages::TeamcityMessages()
+: m_out(&cout)
+{}
+
+void TeamcityMessages::setOutput(ostream &out) {
+    m_out = &out;
+}
+
+string TeamcityMessages::escape(string s) {
+    string result;
+    
+    for (size_t i = 0; i < s.length(); i++) {
+        char c = s[i];
+        
+        switch (c) {
+        case '\n': result.append("|n"); break;
+        case '\r': result.append("|r"); break;
+        case '\'': result.append("|'"); break;
+        case '|':  result.append("||"); break;
+        case ']':  result.append("|]"); break;
+        default:   result.append(&c, 1);
+        }
+    }
+    
+    return result;
+}
+
+void TeamcityMessages::openMsg(const string &name) {
+    // endl for http://jetbrains.net/tracker/issue/TW-4412
+    *m_out << endl << "##teamcity[" << name;
+}
+
+void TeamcityMessages::closeMsg() {
+    *m_out << "]";
+    // endl for http://jetbrains.net/tracker/issue/TW-4412
+    *m_out << endl;
+    m_out->flush();
+}
+
+void TeamcityMessages::writeProperty(string name, string value) {
+    *m_out << " " << name << "='" << escape(value) << "'";
+}
+
+void TeamcityMessages::suiteStarted(string name, string flowid) {
+    openMsg("testSuiteStarted");
+    writeProperty("name", name);
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::suiteFinished(string name, string flowid) {
+    openMsg("testSuiteFinished");
+    writeProperty("name", name);
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::testStarted(string name, string flowid) {
+    openMsg("testStarted");
+    writeProperty("name", name);
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::testFinished(string name, int durationMs, string flowid) {
+    openMsg("testFinished");
+
+    writeProperty("name", name);
+
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+
+    if(durationMs >= 0) {
+        stringstream out;
+        out << durationMs;
+        writeProperty("duration", out.str());
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::testFailed(string name, string message, string details, string flowid) {
+    openMsg("testFailed");
+    writeProperty("name", name);
+    writeProperty("message", message);
+    writeProperty("details", details);
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::testIgnored(std::string name, std::string message, string flowid) {
+    openMsg("testIgnored");
+    writeProperty("name", name);
+    writeProperty("message", message);
+    if(flowid.length() > 0) {
+        writeProperty("flowId", flowid);
+    }
+    
+    closeMsg();
+}
+
+void TeamcityMessages::messageError(const std::string& text)
+{
+	openMsg("message");
+	writeProperty("text", text);
+	writeProperty("status", "ERROR");
+	closeMsg();
+}
+
+void TeamcityMessages::messageWarning(const std::string& text)
+{
+	openMsg("message");
+	writeProperty("text", text);
+	writeProperty("status", "WARNING");
+	closeMsg();
+}
+
+void TeamcityMessages::messageNormal(const std::string& text)
+{
+	openMsg("message");
+	writeProperty("text", text);
+	writeProperty("status", "NORMAL");
+	closeMsg();
+}
+
+}

+ 59 - 0
spine-cpp/spine-cpp-unit-tests/teamcity/teamcity_messages.h

@@ -0,0 +1,59 @@
+/* Copyright 2011 JetBrains s.r.o.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Revision: 88625 $
+*/
+
+#ifndef H_TEAMCITY_MESSAGES
+#define H_TEAMCITY_MESSAGES
+
+#include <string>
+#include <iostream>
+
+namespace JetBrains {
+
+std::string getFlowIdFromEnvironment();
+bool underTeamcity();
+
+class TeamcityMessages {
+    std::ostream *m_out;
+    
+protected:
+    std::string escape(std::string s);
+
+    void openMsg(const std::string &name);
+    void writeProperty(std::string name, std::string value);
+    void closeMsg();
+
+public:
+    TeamcityMessages();
+    
+    void setOutput(std::ostream &);
+    
+    void suiteStarted(std::string name, std::string flowid = "");
+    void suiteFinished(std::string name, std::string flowid = "");
+    
+    void testStarted(std::string name, std::string flowid = "");
+    void testFailed(std::string name, std::string message, std::string details, std::string flowid = "");
+    void testIgnored(std::string name, std::string message, std::string flowid = "");
+    void testFinished(std::string name, int durationMs = -1, std::string flowid = "");    
+
+	void messageError(const std::string& text);
+	void messageWarning(const std::string& text);
+	void messageNormal(const std::string& text);
+};
+
+}
+
+#endif /* H_TEAMCITY_MESSAGES */

+ 48 - 0
spine-cpp/spine-cpp-unit-tests/tests/CPP_InterfaceTestFixture.cpp

@@ -0,0 +1,48 @@
+//////////////////////////////////////////////////////////////////////
+//	filename: 	C_InterfaceTestFixture.cpp
+//	
+//	notes:		There is no C++ interface!
+//
+/////////////////////////////////////////////////////////////////////
+
+#include "CPP_InterfaceTestFixture.h" 
+
+CPP_InterfaceTestFixture::~CPP_InterfaceTestFixture()
+{
+	finalize();
+}
+
+void CPP_InterfaceTestFixture::initialize()
+{
+	// on a Per- Fixture Basis, before Test execution
+}
+
+void CPP_InterfaceTestFixture::finalize()
+{
+	// on a Per- Fixture Basis, after all tests pass/fail
+}
+
+void CPP_InterfaceTestFixture::setUp()
+{
+	// Setup on Per-Test Basis
+}
+
+void CPP_InterfaceTestFixture::tearDown()
+{
+	// Tear Down on Per-Test Basis
+}
+
+void CPP_InterfaceTestFixture::spineboyTestCase()
+{
+	// There is no C++ interface.
+}
+
+void CPP_InterfaceTestFixture::raptorTestCase()
+{
+	// There is no C++ interface.
+}
+
+void CPP_InterfaceTestFixture::goblinsTestCase()
+{
+	// No c++ interface
+}

+ 47 - 0
spine-cpp/spine-cpp-unit-tests/tests/CPP_InterfaceTestFixture.h

@@ -0,0 +1,47 @@
+#pragma once 
+//////////////////////////////////////////////////////////////////////
+//	filename: 	C_InterfaceTestFixture.h
+//	
+//	purpose:	Run example animations for regression testing
+//				on "C++" interface to make sure modifications to "C"
+//				interface doesn't cause memory leaks or regression 
+//				errors.
+/////////////////////////////////////////////////////////////////////
+
+#include "MiniCppUnit.hxx"
+#include "TestOptions.h"
+
+class CPP_InterfaceTestFixture : public TestFixture < CPP_InterfaceTestFixture >
+{
+public:
+	TEST_FIXTURE(CPP_InterfaceTestFixture){
+		TEST_CASE(spineboyTestCase);
+		TEST_CASE(raptorTestCase);
+		TEST_CASE(goblinsTestCase);
+
+		initialize();
+	}
+
+	virtual ~CPP_InterfaceTestFixture();
+
+	//////////////////////////////////////////////////////////////////////////
+	// Test Cases
+	//////////////////////////////////////////////////////////////////////////
+public:
+	void	spineboyTestCase();
+	void	raptorTestCase();
+	void	goblinsTestCase();
+
+	//////////////////////////////////////////////////////////////////////////
+	// test fixture setup
+	//////////////////////////////////////////////////////////////////////////
+	void initialize();
+	void finalize();
+public:
+	virtual void setUp();
+	virtual void tearDown();
+
+};
+#if defined(gForceAllTests) || defined(gCPPInterfaceTestFixture)
+REGISTER_FIXTURE(CPP_InterfaceTestFixture);
+#endif

+ 175 - 0
spine-cpp/spine-cpp-unit-tests/tests/C_InterfaceTestFixture.cpp

@@ -0,0 +1,175 @@
+#include "C_InterfaceTestFixture.h" 
+#include "SpineEventMonitor.h" 
+
+#include <spine/SkeletonJson.h>
+#include <spine/SkeletonData.h>
+#include <spine/Atlas.h>
+#include <spine/AnimationStateData.h>
+#include <spine/Skeleton.h>
+#include <spine/AnimationState.h>
+#include <spine/Animation.h>
+
+#include <vector>
+#include <spine/Extension.h>
+#include <spine/TextureLoader.h>
+#include <spine/Vector.h>
+
+#include <spine/CurveTimeline.h>
+#include <spine/VertexAttachment.h>
+#include <spine/Json.h>
+
+#include <spine/AttachmentLoader.h>
+#include <spine/AtlasAttachmentLoader.h>
+#include <spine/LinkedMesh.h>
+
+#include <new>
+
+#include "KMemory.h" // last include
+
+#define SPINEBOY_JSON "testdata/spineboy/spineboy-ess.json"
+#define SPINEBOY_ATLAS "testdata/spineboy/spineboy.atlas"
+
+#define RAPTOR_JSON "testdata/raptor/raptor-pro.json"
+#define RAPTOR_ATLAS "testdata/raptor/raptor.atlas"
+
+#define GOBLINS_JSON "testdata/goblins/goblins-pro.json"
+#define GOBLINS_ATLAS "testdata/goblins/goblins.atlas"
+
+#define MAX_RUN_TIME 6000 // equal to about 100 seconds of execution
+
+void C_InterfaceTestFixture::setUp()
+{
+}
+
+void C_InterfaceTestFixture::tearDown()
+{
+}
+
+static Spine::SkeletonData* readSkeletonJsonData(const char* filename, Atlas* atlas)
+{
+    using namespace Spine;
+    
+    Vector<Atlas*> atlasArray;
+    atlasArray.push_back(atlas);
+    
+    SkeletonJson* skeletonJson = NEW(SkeletonJson);
+    new (skeletonJson) SkeletonJson(atlasArray);
+	ASSERT(skeletonJson != 0);
+
+	SkeletonData* skeletonData = skeletonJson->readSkeletonDataFile(filename);
+	ASSERT(skeletonData != 0);
+
+    DESTROY(SkeletonJson, skeletonJson);
+    
+	return skeletonData;
+}
+
+typedef std::vector<std::string> AnimList;
+
+static size_t enumerateAnimations(AnimList& outList, SkeletonData* skeletonData)
+{
+	if (skeletonData)
+    {
+		for (int n = 0; n < skeletonData->getAnimations().size(); n++)
+        {
+            outList.push_back(skeletonData->getAnimations()[n]->getName());
+        }
+	}
+
+	return outList.size();
+}
+
+class MyTextureLoader : public TextureLoader
+{
+    virtual void load(AtlasPage& page, std::string path)
+    {
+        page.rendererObject = NULL;
+        page.width = 2048;
+        page.height = 2048;
+    }
+    
+    virtual void unload(void* texture)
+    {
+        // TODO
+    }
+};
+
+static void testRunner(const char* jsonName, const char* atlasName)
+{    
+	///////////////////////////////////////////////////////////////////////////
+	// Global Animation Information
+    MyTextureLoader myTextureLoader;
+    Atlas* atlas = NEW(Atlas);
+    new (atlas) Atlas(atlasName, myTextureLoader);
+	ASSERT(atlas != 0);
+
+	SkeletonData* skeletonData = readSkeletonJsonData(jsonName, atlas);
+	ASSERT(skeletonData != 0);
+
+    AnimationStateData* stateData = NEW(AnimationStateData);
+    new (stateData) AnimationStateData(skeletonData);
+	ASSERT(stateData != 0);
+	stateData->setDefaultMix(0.2f); // force mixing
+
+	///////////////////////////////////////////////////////////////////////////
+	// Animation Instance 
+    Skeleton* skeleton = NEW(Skeleton);
+    new (skeleton) Skeleton(skeletonData);
+	ASSERT(skeleton != 0);
+
+    AnimationState* state = NEW(AnimationState);
+    new (state) AnimationState(stateData);
+	ASSERT(state != 0);
+
+	///////////////////////////////////////////////////////////////////////////
+	// Run animation
+	skeleton->setToSetupPose();
+    SpineEventMonitor eventMonitor(state);
+
+	AnimList anims; // Let's chain all the animations together as a test
+	size_t count = enumerateAnimations(anims, skeletonData);
+	if (count > 0)
+    {
+        state->setAnimation(0, anims[0].c_str(), false);
+    }
+    
+	for (size_t i = 1; i < count; ++i)
+    {
+        state->addAnimation(0, anims[i].c_str(), false, 0.0f);
+	}
+
+	// Run Loop
+	for (int i = 0; i < MAX_RUN_TIME && eventMonitor.isAnimationPlaying(); ++i)
+    {
+		const float timeSlice = 1.0f / 60.0f;
+		skeleton->update(timeSlice);
+		state->update(timeSlice);
+		state->apply(*skeleton);
+	}
+	
+	///////////////////////////////////////////////////////////////////////////
+	// Dispose Instance
+    DESTROY(Skeleton, skeleton);
+    DESTROY(AnimationState, state);
+
+	///////////////////////////////////////////////////////////////////////////
+	// Dispose Global
+    DESTROY(AnimationStateData, stateData);
+    DESTROY(SkeletonData, skeletonData);
+    DESTROY(Atlas, atlas);
+}
+
+void C_InterfaceTestFixture::spineboyTestCase()
+{
+	testRunner(SPINEBOY_JSON, SPINEBOY_ATLAS);
+}
+
+void C_InterfaceTestFixture::raptorTestCase()
+{
+	testRunner(RAPTOR_JSON, RAPTOR_ATLAS);
+}
+
+void C_InterfaceTestFixture::goblinsTestCase()
+{
+	testRunner(GOBLINS_JSON, GOBLINS_ATLAS);
+}

+ 33 - 0
spine-cpp/spine-cpp-unit-tests/tests/C_InterfaceTestFixture.h

@@ -0,0 +1,33 @@
+#pragma once 
+//////////////////////////////////////////////////////////////////////
+//	filename: 	C_InterfaceTestFixture.h
+//	
+//	purpose:	Run example animations for regression testing
+//				on "C" interface
+/////////////////////////////////////////////////////////////////////
+
+#include "TestOptions.h"
+#include "MiniCppUnit.hxx"
+
+class C_InterfaceTestFixture : public TestFixture<C_InterfaceTestFixture>
+{
+public:
+	TEST_FIXTURE(C_InterfaceTestFixture)
+	{
+		// enable/disable individual tests here
+		TEST_CASE(spineboyTestCase);
+		TEST_CASE(raptorTestCase);
+		TEST_CASE(goblinsTestCase);
+	}
+
+public:
+	virtual void setUp();
+	virtual void tearDown();
+
+	void	spineboyTestCase();
+	void	raptorTestCase();
+	void	goblinsTestCase();
+};
+#if defined(gForceAllTests) || defined(gCInterfaceTestFixture)
+REGISTER_FIXTURE(C_InterfaceTestFixture);
+#endif

+ 25 - 0
spine-cpp/spine-cpp-unit-tests/tests/EmptyTestFixture.cpp

@@ -0,0 +1,25 @@
+#include "EmptyTestFixture.h" 
+
+#include "KMemory.h" // Last include
+
+
+void EmptyTestFixture::setUp()
+{
+}
+
+void EmptyTestFixture::tearDown()
+{
+}
+
+void EmptyTestFixture::emptyTestCase_1()
+{
+	// char* pLeak = new char[256]; // test leak detector
+}
+
+void EmptyTestFixture::emptyTestCase_2()
+{
+}
+
+void EmptyTestFixture::emptyTestCase_3()
+{
+}

+ 26 - 0
spine-cpp/spine-cpp-unit-tests/tests/EmptyTestFixture.h

@@ -0,0 +1,26 @@
+#pragma once 
+#include "TestOptions.h"
+#include "MiniCppUnit.hxx"
+
+class EmptyTestFixture : public TestFixture<EmptyTestFixture>
+{
+public:
+	TEST_FIXTURE(EmptyTestFixture)
+	{
+		// enable/disable individual tests here
+		TEST_CASE(emptyTestCase_1);
+		TEST_CASE(emptyTestCase_2);
+		TEST_CASE(emptyTestCase_3);
+	}
+
+public:
+	virtual void setUp();
+	virtual void tearDown();
+
+	void	emptyTestCase_1();
+	void	emptyTestCase_2();
+	void	emptyTestCase_3();
+};
+#if defined(gForceAllTests) || defined(gEmptyTestFixture)
+REGISTER_FIXTURE(EmptyTestFixture);
+#endif

+ 339 - 0
spine-cpp/spine-cpp-unit-tests/tests/MemoryTestFixture.cpp

@@ -0,0 +1,339 @@
+#include <spine/Extension.h>
+#include "MemoryTestFixture.h"
+#include "SpineEventMonitor.h"
+
+#include "KMemory.h" // last include
+
+#define SPINEBOY_JSON "testdata/spineboy/spineboy-ess.json"
+#define SPINEBOY_ATLAS "testdata/spineboy/spineboy.atlas"
+
+#define MAX_RUN_TIME 6000 // equal to about 100 seconds of execution
+
+MemoryTestFixture::~MemoryTestFixture()
+{
+    finalize();
+}
+
+void MemoryTestFixture::initialize()
+{
+    // on a Per- Fixture Basis, before Test execution
+}
+
+void MemoryTestFixture::finalize()
+{
+    // on a Per- Fixture Basis, after all tests pass/fail
+}
+
+void MemoryTestFixture::setUp()
+{
+    // Setup on Per-Test Basis
+}
+
+void MemoryTestFixture::tearDown()
+{
+    // Tear Down on Per-Test Basis
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+// Helper methods
+static spSkeletonData* readSkeletonJsonData(const char* filename, spAtlas* atlas) {
+    spSkeletonJson* json = spSkeletonJson_create(atlas);
+    ASSERT(json != 0);
+
+    spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, filename);
+    ASSERT(skeletonData != 0);
+
+    spSkeletonJson_dispose(json);
+    return skeletonData;
+}
+
+static void LoadSpineboyExample(spAtlas* &atlas, spSkeletonData* &skeletonData, spAnimationStateData* &stateData, spSkeleton* &skeleton, spAnimationState* &state)
+{
+    ///////////////////////////////////////////////////////////////////////////
+    // Global Animation Information
+    atlas = spAtlas_createFromFile(SPINEBOY_ATLAS, 0);
+    ASSERT(atlas != 0);
+
+    skeletonData = readSkeletonJsonData(SPINEBOY_JSON, atlas);
+    ASSERT(skeletonData != 0);
+
+    stateData = spAnimationStateData_create(skeletonData);
+    ASSERT(stateData != 0);
+    stateData->defaultMix = 0.4f; // force mixing
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Animation Instance 
+    skeleton = spSkeleton_create(skeletonData);
+    ASSERT(skeleton != 0);
+
+    state = spAnimationState_create(stateData);
+    ASSERT(state != 0);
+}
+
+static void DisposeAll(spSkeleton* skeleton, spAnimationState* state, spAnimationStateData* stateData, spSkeletonData* skeletonData, spAtlas* atlas)
+{
+    ///////////////////////////////////////////////////////////////////////////
+    // Dispose Instance
+    spSkeleton_dispose(skeleton);
+    spAnimationState_dispose(state);
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Dispose Global
+    spAnimationStateData_dispose(stateData);
+    spSkeletonData_dispose(skeletonData);
+    spAtlas_dispose(atlas);
+}
+
+
+//////////////////////////////////////////////////////////////////////////
+// Reproduce Memory leak as described in Issue #776
+// https://github.com/EsotericSoftware/spine-runtimes/issues/776
+void MemoryTestFixture::reproduceIssue_776()
+{
+    spAtlas* atlas = 0;
+    spSkeletonData* skeletonData = 0;
+    spAnimationStateData* stateData = 0;
+    spSkeleton* skeleton = 0;
+    spAnimationState* state = 0;
+
+    //////////////////////////////////////////////////////////////////////////
+    // Initialize Animations
+    LoadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Run animation
+    spSkeleton_setToSetupPose(skeleton);
+    InterruptMonitor eventMonitor(state);
+    //eventMonitor.SetDebugLogging(true);
+
+    // Interrupt the animation on this specific sequence of spEventType(s)
+    eventMonitor
+        .AddInterruptEvent(SP_ANIMATION_INTERRUPT, "jump")
+        .AddInterruptEvent(SP_ANIMATION_START);
+
+    spAnimationState_setAnimationByName(state, 0, "walk", true);
+    spAnimationState_addAnimationByName(state, 0, "jump", false, 0.0f);
+    spAnimationState_addAnimationByName(state, 0, "run",  true,  0.0f);
+    spAnimationState_addAnimationByName(state, 0, "jump", false, 3.0f);
+    spAnimationState_addAnimationByName(state, 0, "walk", true,  0.0f);
+    spAnimationState_addAnimationByName(state, 0, "idle", false, 1.0f);
+
+    for (int i = 0; i < MAX_RUN_TIME && eventMonitor.isAnimationPlaying(); ++i) {
+        const float timeSlice = 1.0f / 60.0f;
+        spSkeleton_update(skeleton, timeSlice);
+        spAnimationState_update(state, timeSlice);
+        spAnimationState_apply(state, skeleton);
+    }
+
+    //////////////////////////////////////////////////////////////////////////
+    // Cleanup Animations
+    DisposeAll(skeleton, state, stateData, skeletonData, atlas);
+}
+
+void MemoryTestFixture::reproduceIssue_777()
+{
+    spAtlas* atlas = 0;
+    spSkeletonData* skeletonData = 0;
+    spAnimationStateData* stateData = 0;
+    spSkeleton* skeleton = 0;
+    spAnimationState* state = 0;
+
+    //////////////////////////////////////////////////////////////////////////
+    // Initialize Animations
+    LoadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+
+    ///////////////////////////////////////////////////////////////////////////
+    // Run animation
+    spSkeleton_setToSetupPose(skeleton);
+    SpineEventMonitor eventMonitor(state);
+    //eventMonitor.SetDebugLogging(true);
+
+    // Set Animation and Play for 5 frames
+    spAnimationState_setAnimationByName(state, 0, "walk", true);
+    for (int i = 0; i < 5; ++i) {
+        const float timeSlice = 1.0f / 60.0f;
+        spSkeleton_update(skeleton, timeSlice);
+        spAnimationState_update(state, timeSlice);
+        spAnimationState_apply(state, skeleton);
+    }
+
+    // Change animation twice in a row
+    spAnimationState_setAnimationByName(state, 0, "walk", false);
+    spAnimationState_setAnimationByName(state, 0, "run", false);
+
+    // run normal update
+    for (int i = 0; i < 5; ++i) {
+        const float timeSlice = 1.0f / 60.0f;
+        spSkeleton_update(skeleton, timeSlice);
+        spAnimationState_update(state, timeSlice);
+        spAnimationState_apply(state, skeleton);
+    }
+
+    // Now we'd lose mixingFrom (the first "walk" entry we set above) and should leak
+    spAnimationState_setAnimationByName(state, 0, "run", false);
+
+    //////////////////////////////////////////////////////////////////////////
+    // Cleanup Animations
+    DisposeAll(skeleton, state, stateData, skeletonData, atlas);
+}
+
+spSkeleton* skeleton = 0;
+static void  spineAnimStateHandler(spAnimationState* state, int type, spTrackEntry* entry, spEvent* event)
+{
+    if (type == SP_ANIMATION_COMPLETE)
+    {
+        spAnimationState_setAnimationByName(state, 0, "walk", false);
+        spAnimationState_update(state, 0);
+        spAnimationState_apply(state, skeleton);
+    }
+}
+
+void MemoryTestFixture::reproduceIssue_Loop()
+{
+    spAtlas* atlas = 0;
+    spSkeletonData* skeletonData = 0;
+    spAnimationStateData* stateData = 0;
+    spAnimationState* state = 0;
+
+    //////////////////////////////////////////////////////////////////////////
+    // Initialize Animations
+    LoadSpineboyExample(atlas, skeletonData, stateData, skeleton, state);
+
+    ///////////////////////////////////////////////////////////////////////////
+
+    if (state)
+        state->listener = (spAnimationStateListener)&spineAnimStateHandler;
+
+    spAnimationState_setAnimationByName(state, 0, "walk", false);
+
+    // run normal update
+    for (int i = 0; i < 50; ++i) {
+        const float timeSlice = 1.0f / 60.0f;
+        spSkeleton_update(skeleton, timeSlice);
+        spAnimationState_update(state, timeSlice);
+        spAnimationState_apply(state, skeleton);
+    }
+
+    DisposeAll(skeleton, state, stateData, skeletonData, atlas);
+}
+
+void MemoryTestFixture::triangulator() {
+    spTriangulator* triangulator = spTriangulator_create();
+    spFloatArray* polygon = spFloatArray_create(16);
+    spFloatArray_add(polygon, 0);
+    spFloatArray_add(polygon, 0);
+    spFloatArray_add(polygon, 100);
+    spFloatArray_add(polygon, 0);
+    spFloatArray_add(polygon, 100);
+    spFloatArray_add(polygon, 100);
+    spFloatArray_add(polygon, 0);
+    spFloatArray_add(polygon, 100);
+
+    spShortArray* triangles = spTriangulator_triangulate(triangulator, polygon);
+    ASSERT(triangles->size == 6);
+    ASSERT(triangles->items[0] == 3);
+    ASSERT(triangles->items[1] == 0);
+    ASSERT(triangles->items[2] == 1);
+    ASSERT(triangles->items[3] == 3);
+    ASSERT(triangles->items[4] == 1);
+    ASSERT(triangles->items[5] == 2);
+
+    spArrayFloatArray* polys = spTriangulator_decompose(triangulator, polygon, triangles);
+    ASSERT(polys->size == 1);
+    ASSERT(polys->items[0]->size == 8);
+    ASSERT(polys->items[0]->items[0] == 0);
+    ASSERT(polys->items[0]->items[1] == 100);
+    ASSERT(polys->items[0]->items[2] == 0);
+    ASSERT(polys->items[0]->items[3] == 0);
+    ASSERT(polys->items[0]->items[4] == 100);
+    ASSERT(polys->items[0]->items[5] == 0);
+    ASSERT(polys->items[0]->items[6] == 100);
+    ASSERT(polys->items[0]->items[7] == 100);
+
+    spFloatArray_dispose(polygon);
+    spTriangulator_dispose(triangulator);
+}
+
+void MemoryTestFixture::skeletonClipper() {
+    spSkeletonClipping* clipping = spSkeletonClipping_create();
+
+    spBoneData* boneData = spBoneData_create(0, "bone", 0);
+    spBone* bone = spBone_create(boneData, 0, 0);
+    CONST_CAST(float, bone->a) = 1;
+    CONST_CAST(float, bone->b) = 0;
+    CONST_CAST(float, bone->c) = 0;
+    CONST_CAST(float, bone->d) = 1;
+    CONST_CAST(float, bone->worldX) = 0;
+    CONST_CAST(float, bone->worldY) = 0;
+    spSlotData* slotData = spSlotData_create(0, "slot", 0);
+    spSlot* slot = spSlot_create(slotData, bone);
+    spClippingAttachment* clip = spClippingAttachment_create("clipping");
+    clip->endSlot = slotData;
+    clip->super.worldVerticesLength = 4 * 2;
+    clip->super.verticesCount = 4;
+    clip->super.vertices = MALLOC(float, 4 * 8);
+    clip->super.vertices[0] = 0;
+    clip->super.vertices[1] = 50;
+    clip->super.vertices[2] = 100;
+    clip->super.vertices[3] = 50;
+    clip->super.vertices[4] = 100;
+    clip->super.vertices[5] = 70;
+    clip->super.vertices[6] = 0;
+    clip->super.vertices[7] = 70;
+
+    spSkeletonClipping_clipStart(clipping, slot, clip);
+
+    spFloatArray* vertices = spFloatArray_create(16);
+    spFloatArray_add(vertices, 0);
+    spFloatArray_add(vertices, 0);
+    spFloatArray_add(vertices, 100);
+    spFloatArray_add(vertices, 0);
+    spFloatArray_add(vertices, 50);
+    spFloatArray_add(vertices, 150);
+    spFloatArray* uvs = spFloatArray_create(16);
+    spFloatArray_add(uvs, 0);
+    spFloatArray_add(uvs, 0);
+    spFloatArray_add(uvs, 1);
+    spFloatArray_add(uvs, 0);
+    spFloatArray_add(uvs, 0.5f);
+    spFloatArray_add(uvs, 1);
+    spUnsignedShortArray* indices = spUnsignedShortArray_create(16);
+    spUnsignedShortArray_add(indices, 0);
+    spUnsignedShortArray_add(indices, 1);
+    spUnsignedShortArray_add(indices, 2);
+
+    spSkeletonClipping_clipTriangles(clipping, vertices->items, vertices->size, indices->items, indices->size, uvs->items, 2);
+
+    float expectedVertices[8] = { 83.333328, 50.000000, 76.666664, 70.000000, 23.333334, 70.000000, 16.666672, 50.000000 };
+    ASSERT(clipping->clippedVertices->size == 8);
+    for (int i = 0; i < clipping->clippedVertices->size; i++) {
+        ASSERT(ABS(clipping->clippedVertices->items[i] - expectedVertices[i]) < 0.001);
+    }
+
+    float expectedUVs[8] = { 0.833333f, 0.333333, 0.766667, 0.466667, 0.233333, 0.466667, 0.166667, 0.333333 };
+    ASSERT(clipping->clippedUVs->size == 8);
+    for (int i = 0; i < clipping->clippedUVs->size; i++) {
+        ASSERT(ABS(clipping->clippedUVs->items[i] - expectedUVs[i]) < 0.001);
+    }
+
+    short expectedIndices[6] = { 0, 1, 2, 0, 2, 3 };
+    ASSERT(clipping->clippedTriangles->size == 6);
+    for (int i = 0; i < clipping->clippedTriangles->size; i++) {
+        ASSERT(clipping->clippedTriangles->items[i] == expectedIndices[i]);
+    }
+
+    spFloatArray_dispose(vertices);
+    spFloatArray_dispose(uvs);
+    spUnsignedShortArray_dispose(indices);
+
+    spSlotData_dispose(slotData);
+    spSlot_dispose(slot);
+    spBoneData_dispose(boneData);
+    spBone_dispose(bone);
+    _spClippingAttachment_dispose(SUPER(SUPER(clip)));
+    spSkeletonClipping_dispose(clipping);
+}
+
+
+

+ 50 - 0
spine-cpp/spine-cpp-unit-tests/tests/MemoryTestFixture.h

@@ -0,0 +1,50 @@
+//////////////////////////////////////////////////////////////////////
+//	filename: 	MemoryTestFixture.h
+//	
+//	purpose:	Reproduce Memory Error/Leak Bugs to help debug
+//				and for regression testing
+/////////////////////////////////////////////////////////////////////
+
+#pragma once 
+#include "MiniCppUnit.hxx"
+#include "TestOptions.h"
+
+class MemoryTestFixture : public TestFixture < MemoryTestFixture >
+{
+public:
+	TEST_FIXTURE(MemoryTestFixture){
+
+		// Comment out here to disable individual test cases 
+		TEST_CASE(reproduceIssue_776);
+		TEST_CASE(reproduceIssue_777);
+		TEST_CASE(reproduceIssue_Loop);
+		TEST_CASE(triangulator);
+		TEST_CASE(skeletonClipper);
+
+		initialize();
+	}
+
+	virtual ~MemoryTestFixture();
+
+	//////////////////////////////////////////////////////////////////////////
+	// Test Cases
+	//////////////////////////////////////////////////////////////////////////
+public:
+	void reproduceIssue_776();
+	void reproduceIssue_777();
+	void reproduceIssue_Loop(); // http://esotericsoftware.com/forum/spine-c-3-5-animation-jerking-7451
+	void triangulator();
+	void skeletonClipper();
+
+	//////////////////////////////////////////////////////////////////////////
+	// test fixture setup
+	//////////////////////////////////////////////////////////////////////////
+	void initialize();
+	void finalize();
+public:
+	virtual void setUp();
+	virtual void tearDown();
+};
+#if defined(gForceAllTests) || defined(gMemoryTestFixture)
+REGISTER_FIXTURE(MemoryTestFixture);
+#endif

+ 181 - 0
spine-cpp/spine-cpp-unit-tests/tests/SpineEventMonitor.cpp

@@ -0,0 +1,181 @@
+#include "SpineEventMonitor.h" 
+
+#include "KString.h"
+
+#include <spine/Animation.h>
+#include <spine/Event.h>
+
+#include "KMemory.h" // Last include
+
+using namespace Spine;
+
+SpineEventMonitor::SpineEventMonitor(AnimationState* _pAnimationState /*= nullptr*/)
+{
+	bLogging = false;
+	RegisterListener(_pAnimationState);
+}
+
+SpineEventMonitor::~SpineEventMonitor()
+{
+	pAnimState = 0;
+}
+
+void SpineEventMonitor::RegisterListener(AnimationState * _pAnimationState)
+{
+    if (_pAnimationState)
+    {
+        _pAnimationState->setRendererObject(this);
+        _pAnimationState->setOnAnimationEventFunc(&SpineEventMonitor::spineAnimStateHandler);
+    }
+    pAnimState = _pAnimationState;
+}
+
+bool SpineEventMonitor::isAnimationPlaying()
+{
+    if (pAnimState)
+    {
+        return pAnimState->getCurrent(0) != NULL;
+    }
+	return false;
+}
+
+void SpineEventMonitor::spineAnimStateHandler(AnimationState* state, EventType type, TrackEntry* entry, Event* event)
+{
+    if (state && state->getRendererObject())
+    {
+        SpineEventMonitor* pEventMonitor = (SpineEventMonitor*)state->getRendererObject();
+        pEventMonitor->OnSpineAnimationStateEvent(state, type, entry, event);
+    }
+}
+
+void SpineEventMonitor::OnSpineAnimationStateEvent(AnimationState* state, EventType type, TrackEntry* entry, Event* event)
+{
+    const char* eventName = 0;
+    if (state == pAnimState)
+    {
+        // only monitor ours
+        switch(type)
+        {
+        case EventType_Start: eventName = "EventType_Start"; break;
+        case EventType_Interrupt: eventName = "EventType_Interrupt"; break;
+        case EventType_End: eventName = "EventType_End"; break;
+        case EventType_Complete: eventName = "EventType_Complete"; break;
+        case EventType_Dispose: eventName = "EventType_Dispose"; break;
+        case EventType_Event: eventName = "EventType_Event"; break;
+        default:
+            break;
+        }
+
+        if (bLogging && eventName && entry && entry->getAnimation())
+            KOutputDebug(DEBUGLVL, "[%s : '%s']\n", eventName, entry->getAnimation()->getName().c_str());//*/
+    }
+}
+
+InterruptMonitor::InterruptMonitor(AnimationState * _pAnimationState):
+	SpineEventMonitor(_pAnimationState)
+{
+	bForceInterrupt = false;
+	mEventStackCursor = 0; // cursor used to track events
+}
+
+bool InterruptMonitor::isAnimationPlaying()
+{
+	return !bForceInterrupt && SpineEventMonitor::isAnimationPlaying();
+}
+
+// Stops the animation on any occurance of the spEventType
+InterruptMonitor& InterruptMonitor::AddInterruptEvent(int theEventType)
+{
+	InterruptEvent ev;
+	ev.mEventType = theEventType;
+	mEventStack.push_back(ev);
+	return *this;
+}
+
+// Stops the animation when the [spEventType : 'animationName'] occurs
+InterruptMonitor& InterruptMonitor::AddInterruptEvent(int theEventType, const std::string & theAnimationName)
+{
+	InterruptEvent ev;
+	ev.mEventType = theEventType;
+	ev.mAnimName = theAnimationName;
+	mEventStack.push_back(ev);
+	return *this;
+}
+
+// stops the first encounter of spEventType on the specified TrackEntry
+InterruptMonitor& InterruptMonitor::AddInterruptEvent(int theEventType, TrackEntry * theTrackEntry)
+{
+	InterruptEvent ev;
+	ev.mEventType = theEventType;
+	ev.mTrackEntry = theTrackEntry;
+	mEventStack.push_back(ev);
+	return *this;
+}
+
+// Stops on the first SP_ANIMATION_EVENT with the string payload of 'theEventTriggerName'
+InterruptMonitor& InterruptMonitor::AddInterruptEventTrigger(const std::string & theEventTriggerName)
+{
+	InterruptEvent ev;
+    ev.mEventType = EventType_Event;
+	ev.mEventName = theEventTriggerName;
+	mEventStack.push_back(ev);
+	return *this;
+}
+
+void InterruptMonitor::OnSpineAnimationStateEvent(AnimationState * state, EventType type, TrackEntry * trackEntry, Event * event)
+{
+	SpineEventMonitor::OnSpineAnimationStateEvent(state, type, trackEntry, event);
+
+	if (mEventStackCursor < mEventStack.size())
+    {
+		if (mEventStack[mEventStackCursor].matches(state, type, trackEntry, event))
+        {
+            ++mEventStackCursor;
+        }
+
+		if (mEventStackCursor >= mEventStack.size())
+        {
+			bForceInterrupt = true;
+			OnMatchingComplete();
+		}
+	}
+}
+
+inline bool InterruptMonitor::InterruptEvent::matches(AnimationState * state, EventType type, TrackEntry * trackEntry, Event * event)
+{
+	// Must match EventType {EventType_Start, EventType_Interrupt, EventType_End, EventType_Complete, EventType_Dispose, EventType_Event }
+    if (mEventType == type)
+    {
+        // Looking for specific TrackEntry by pointer
+        if (mTrackEntry != 0)
+        {
+            return mTrackEntry == trackEntry;
+        }
+
+        // looking for Animation Track by name
+        if (!mAnimName.empty())
+        {
+            if (trackEntry && trackEntry->getAnimation())
+            {
+                if (CompareNoCase(trackEntry->getAnimation()->getName(), mAnimName) == 0)
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        // looking for Event String Text
+        if (!mEventName.empty())
+        {
+            if (event)
+            {
+                return (CompareNoCase(event->getStringValue(), mEventName) == 0);
+            }
+            return false;
+        }
+
+        return true; // waiting for ANY spEventType that matches
+    }
+	return false;
+}

+ 121 - 0
spine-cpp/spine-cpp-unit-tests/tests/SpineEventMonitor.h

@@ -0,0 +1,121 @@
+//////////////////////////////////////////////////////////////////////
+//	filename: 	SpineEventMonitor.h
+//	
+//	purpose:	Monitor spAnimationState Events
+/////////////////////////////////////////////////////////////////////
+
+#pragma once 
+
+#include <vector>
+#include <string>
+
+#include <spine/AnimationState.h>
+
+using namespace Spine;
+
+//////////////////////////////////////////////////////////////////////
+//	class: 	SpineEventMonitor
+//	
+//	purpose:	Monitor spAnimationState Events and report when there
+//				are no more TrackEntry(s) waiting to play on track 0;
+//
+//				Also allows for debug printing of Events to console.
+/////////////////////////////////////////////////////////////////////
+class SpineEventMonitor
+{
+public:
+	SpineEventMonitor(AnimationState* _pAnimationState = 0);
+	virtual ~SpineEventMonitor();
+
+	void RegisterListener(AnimationState* _pAnimationState);
+
+	void SetDebugLogging(bool val) { bLogging = val; }
+	bool GetDebugLogging() { return bLogging; }
+
+	virtual bool isAnimationPlaying();
+
+protected:
+	static void	spineAnimStateHandler(AnimationState* state, EventType type, TrackEntry* entry, Event* event);
+	virtual void OnSpineAnimationStateEvent(AnimationState* state, EventType type, TrackEntry* entry, Event* event);
+
+protected:
+	AnimationState	*pAnimState;
+	bool				bLogging;
+};
+
+//////////////////////////////////////////////////////////////////////
+//	class: 	InterruptMonitor
+//	
+//	purpose:	Allows a programmer to interrupt/stop the updating
+//				of an animation based on a specific sequence of
+//				events generated by the animation.
+/////////////////////////////////////////////////////////////////////
+class InterruptMonitor : public SpineEventMonitor
+{
+private:
+	struct InterruptEvent
+	{
+		InterruptEvent() {
+			mEventType = -1; // invalid
+			mTrackEntry = 0;
+		}
+
+		bool matches(AnimationState* state, EventType type, TrackEntry* trackEntry, Event* event);
+
+		std::string mAnimName;
+		int mEventType;
+		TrackEntry* mTrackEntry;
+		std::string mEventName;
+	};
+	typedef std::vector<InterruptEvent> InterruptEventStack;
+
+
+public:
+	InterruptMonitor(AnimationState* _pAnimationState = 0);
+	~InterruptMonitor() {}
+
+	virtual bool isAnimationPlaying() override;
+
+public:
+	InterruptMonitor& AddInterruptEvent(int theEventType);
+	InterruptMonitor& AddInterruptEvent(int theEventType, const std::string& theAnimationName);
+	InterruptMonitor& AddInterruptEvent(int theEventType, TrackEntry* theTrackEntry);
+	InterruptMonitor& AddInterruptEventTrigger(const std::string& theEventTriggerName);
+
+protected:
+	virtual void OnSpineAnimationStateEvent(AnimationState* state, EventType type, TrackEntry* trackEntry, Event* event) override;
+	virtual void OnMatchingComplete() {}
+
+protected:
+	bool bForceInterrupt;
+	InterruptEventStack mEventStack; // must match these events in this order
+	size_t mEventStackCursor;
+};
+
+/*
+
+EXAMPLE
+=======
+
+SpineEventMonitor eventMonitor(state);
+eventMonitor.SetDebugLogging(true);
+
+while(eventMonitor.isAnimationPlaying()){
+	// update...
+}
+
+
+
+EXAMPLE
+=======
+
+InterruptMonitor eventMonitor(state);
+eventMonitor.SetDebugLogging(true);
+
+// Interrupt the animation on this specific sequence of spEventType(s)
+eventMonitor
+	.AddInterruptEvent(SP_ANIMATION_INTERRUPT, "jump")	// First, wait for INTERRUPT signal on the 'jump' animation TrackEntry
+	.AddInterruptEvent(SP_ANIMATION_START);				// Then, stop on any following START signal
+
+
+*/

+ 26 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/CPP_InterfaceTestFixture.cpp

@@ -0,0 +1,26 @@
+#include "CPP_InterfaceTestFixture.h" 
+
+CPP_InterfaceTestFixture::~CPP_InterfaceTestFixture()
+{
+	finalize();
+}
+
+void CPP_InterfaceTestFixture::initialize()
+{
+	// on a Per- Fixture Basis, before Test execution
+}
+
+void CPP_InterfaceTestFixture::finalize()
+{
+	// on a Per- Fixture Basis, after all tests pass/fail
+}
+
+void CPP_InterfaceTestFixture::setUp()
+{
+	// Setup on Per-Test Basis
+}
+
+void CPP_InterfaceTestFixture::tearDown()
+{
+	// Tear Down on Per-Test Basis
+}

+ 30 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/CPP_InterfaceTestFixture.h

@@ -0,0 +1,30 @@
+#pragma once 
+#include "MiniCppUnit.hxx"
+
+class CPP_InterfaceTestFixture : public TestFixture < CPP_InterfaceTestFixture >
+{
+public:
+	TEST_FIXTURE(CPP_InterfaceTestFixture){
+		//TEST_CASE(parseJSON);
+
+		initialize();
+	}
+
+	virtual ~CPP_InterfaceTestFixture();
+
+	//////////////////////////////////////////////////////////////////////////
+	// Test Cases
+	//////////////////////////////////////////////////////////////////////////
+public:
+	// void parseJSON();
+
+	//////////////////////////////////////////////////////////////////////////
+	// test fixture setup
+	//////////////////////////////////////////////////////////////////////////
+	void initialize();
+	void finalize();
+public:
+	virtual void setUp();
+	virtual void tearDown();
+};
+REGISTER_FIXTURE(CPP_InterfaceTestFixture);

+ 26 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/_TestFixture.cpp

@@ -0,0 +1,26 @@
+#include "[[FIXTURE_TYPE]].h" 
+
+[[FIXTURE_TYPE]]::~[[FIXTURE_TYPE]]()
+{
+	finalize();
+}
+
+void [[FIXTURE_TYPE]]::initialize()
+{
+	// on a Per- Fixture Basis, before Test execution
+}
+
+void [[FIXTURE_TYPE]]::finalize()
+{
+	// on a Per- Fixture Basis, after all tests pass/fail
+}
+
+void [[FIXTURE_TYPE]]::setUp()
+{
+	// Setup on Per-Test Basis
+}
+
+void [[FIXTURE_TYPE]]::tearDown()
+{
+	// Tear Down on Per-Test Basis
+}

+ 30 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/_TestFixture.h

@@ -0,0 +1,30 @@
+#pragma once 
+#include "MiniCppUnit.hxx"
+
+class [[FIXTURE_TYPE]] : public TestFixture < [[FIXTURE_TYPE]] >
+{
+public:
+	TEST_FIXTURE([[FIXTURE_TYPE]]){
+		//TEST_CASE(parseJSON);
+
+		initialize();
+	}
+
+	virtual ~[[FIXTURE_TYPE]]();
+
+	//////////////////////////////////////////////////////////////////////////
+	// Test Cases
+	//////////////////////////////////////////////////////////////////////////
+public:
+	// void parseJSON();
+
+	//////////////////////////////////////////////////////////////////////////
+	// test fixture setup
+	//////////////////////////////////////////////////////////////////////////
+	void initialize();
+	void finalize();
+public:
+	virtual void setUp();
+	virtual void tearDown();
+};
+REGISTER_FIXTURE([[FIXTURE_TYPE]]);

BIN
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/fnr.exe


+ 17 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestFixtureGenerator/makeFixture.bat

@@ -0,0 +1,17 @@
+@echo off
+if "%1"=="" goto blank
+
+copy "_TestFixture.cpp" "%1TestFixture.cpp"
+copy "_TestFixture.h" "%1TestFixture.h"
+
+
+fnr --cl --find "[[FIXTURE_TYPE]]" --replace "%1TestFixture" --fileMask "%1TestFixture.cpp" --dir %cd%
+fnr --cl --find "[[FIXTURE_TYPE]]" --replace "%1TestFixture" --fileMask "%1TestFixture.h" --dir %cd%
+
+goto done
+
+:blank
+echo Usage: 
+echo       %~n0 FixtureTypeName
+
+:done

+ 32 - 0
spine-cpp/spine-cpp-unit-tests/tests/TestOptions.h

@@ -0,0 +1,32 @@
+#pragma once
+
+//////////////////////////////////////////////////////////////////////////
+// Force all Tests to 'ON.'  Use this for final 'Regression' Testing.
+
+//#define gForceAllTests
+
+//#define TURN_ON_ALL_TESTS // Comment this line out to switch to fast testing only
+
+#ifdef TURN_ON_ALL_TESTS
+//////////////////////////////////////////////////////////////////////////
+// All tests are ON by default, but you can turn off individual tests.
+
+#define gEmptyTestFixture
+#define gCInterfaceTestFixture
+#define gCPPInterfaceTestFixture
+#define gMemoryTestFixture
+
+
+#else
+
+//////////////////////////////////////////////////////////////////////////
+// Slow Tests are disabled by default.  Use this section to turn on
+// Individual tests.
+#define gEmptyTestFixture  // Fast
+
+#define gCInterfaceTestFixture // slow
+#define gCPPInterfaceTestFixture // fast
+
+#define gMemoryTestFixture // medium
+
+#endif

+ 100 - 0
spine-cpp/spine-cpp/include/spine/Animation.h

@@ -0,0 +1,100 @@
+/******************************************************************************
+ * 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_Animation_h
+#define Spine_Animation_h
+
+#include <spine/Vector.h>
+#include <spine/MixPose.h>
+#include <spine/MixDirection.h>
+
+#include <string>
+
+namespace Spine {
+    class Timeline;
+    class Skeleton;
+    class Event;
+    
+    class Animation {
+        friend class AnimationState;
+        friend class TrackEntry;
+        friend class AnimationStateData;
+        
+        friend class AttachmentTimeline;
+        friend class ColorTimeline;
+        friend class DeformTimeline;
+        friend class DrawOrderTimeline;
+        friend class EventTimeline;
+        friend class IkConstraintTimeline;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        friend class RotateTimeline;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TransformConstraintTimeline;
+        friend class TranslateTimeline;
+        friend class TwoColorTimeline;
+        
+    public:
+        Animation(std::string name, Vector<Timeline*>& timelines, float duration);
+        
+        ~Animation();
+        
+        /// Applies all the animation's timelines to the specified skeleton.
+        /// See also Timeline::apply(Skeleton&, float, float, Vector, float, MixPose, MixDirection)
+        void apply(Skeleton& skeleton, float lastTime, float time, bool loop, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        std::string getName();
+        
+        Vector<Timeline*> getTimelines();
+        
+        void setTimelines(Vector<Timeline*> inValue);
+        
+        float getDuration();
+        
+        void setDuration(float inValue);
+        
+    private:
+        Vector<Timeline*> _timelines;
+        float _duration;
+        std::string _name;
+        
+        /// @param target After the first and before the last entry.
+        static int binarySearch(Vector<float>& values, float target, int step);
+        
+        /// @param target After the first and before the last entry.
+        static int binarySearch(Vector<float>& values, float target);
+        
+        static int linearSearch(Vector<float>& values, float target, int step);
+    };
+}
+
+#endif /* Spine_Animation_h */

+ 422 - 0
spine-cpp/spine-cpp/include/spine/AnimationState.h

@@ -0,0 +1,422 @@
+/******************************************************************************
+ * 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_AnimationState_h
+#define Spine_AnimationState_h
+
+#include <spine/Vector.h>
+#include <spine/Pool.h>
+#include <spine/MixPose.h>
+
+namespace Spine {
+    enum EventType {
+        EventType_Start,
+        EventType_Interrupt,
+        EventType_End,
+        EventType_Complete,
+        EventType_Dispose,
+        EventType_Event
+    };
+    
+    class AnimationState;
+    class TrackEntry;
+
+    class Animation;
+    class Event;
+    class AnimationStateData;
+    class Skeleton;
+    class RotateTimeline;
+    
+    typedef void (*OnAnimationEventFunc) (AnimationState* state, EventType type, TrackEntry* entry, Event* event);
+    
+    /// State for the playback of an animation
+    class TrackEntry {
+        friend class EventQueue;
+        friend class AnimationState;
+        
+    public:
+        TrackEntry();
+        
+        /// The index of the track where this entry is either current or queued.
+        int getTrackIndex();
+        
+        /// The animation to apply for this track entry.
+        Animation* getAnimation();
+        
+        ///
+        /// If true, the animation will repeat. If false, it will not, instead its last frame is applied if played beyond its duration.
+        bool getLoop();
+        void setLoop(bool inValue);
+        
+        ///
+        /// Seconds to postpone playing the animation. When a track entry is the current track entry, delay postpones incrementing
+        /// the track time. When a track entry is queued, delay is the time from the start of the previous animation to when the
+        /// track entry will become the current track entry.
+        float getDelay();
+        void setDelay(float inValue);
+        
+        ///
+        /// Current time in seconds this track entry has been the current track entry. The track time determines
+        /// TrackEntry.AnimationTime. The track time can be set to start the animation at a time other than 0, without affecting looping.
+        float getTrackTime();
+        void setTrackTime(float inValue);
+        
+        ///
+        /// The track time in seconds when this animation will be removed from the track. Defaults to the animation duration for
+        /// non-looping animations and to int.MaxValue for looping animations. If the track end time is reached and no
+        /// other animations are queued for playback, and mixing from any previous animations is complete, properties keyed by the animation,
+        /// are set to the setup pose and the track is cleared.
+        ///
+        /// It may be desired to use AnimationState.addEmptyAnimation(int, float, float) to mix the properties back to the
+        /// setup pose over time, rather than have it happen instantly.
+        ///
+        float getTrackEnd();
+        void setTrackEnd(float inValue);
+        
+        ///
+        /// Seconds when this animation starts, both initially and after looping. Defaults to 0.
+        ///
+        /// When changing the animation start time, it often makes sense to set TrackEntry.AnimationLast to the same value to
+        /// prevent timeline keys before the start time from triggering.
+        ///
+        float getAnimationStart();
+        void setAnimationStart(float inValue);
+        
+        ///
+        /// Seconds for the last frame of this animation. Non-looping animations won't play past this time. Looping animations will
+        /// loop back to TrackEntry.AnimationStart at this time. Defaults to the animation duration.
+        float getAnimationEnd();
+        void setAnimationEnd(float inValue);
+        
+        ///
+        /// The time in seconds this animation was last applied. Some timelines use this for one-time triggers. Eg, when this
+        /// animation is applied, event timelines will fire all events between the animation last time (exclusive) and animation time
+        /// (inclusive). Defaults to -1 to ensure triggers on frame 0 happen the first time this animation is applied.
+        float getAnimationLast();
+        void setAnimationLast(float inValue);
+        
+        ///
+        /// Uses TrackEntry.TrackTime to compute the animation time between TrackEntry.AnimationStart. and
+        /// TrackEntry.AnimationEnd. When the track time is 0, the animation time is equal to the animation start time.
+        ///
+        float getAnimationTime();
+        
+        ///
+        /// Multiplier for the delta time when the animation state is updated, causing time for this animation to play slower or
+        /// faster. Defaults to 1.
+        ///
+        float getTimeScale();
+        void setTimeScale(float inValue);
+        
+        ///
+        /// Values less than 1 mix this animation with the last skeleton pose. Defaults to 1, which overwrites the last skeleton pose with
+        /// this animation.
+        ///
+        /// Typically track 0 is used to completely pose the skeleton, then alpha can be used on higher tracks. It doesn't make sense
+        /// to use alpha on track 0 if the skeleton pose is from the last frame render.
+        ///
+        float getAlpha();
+        void setAlpha(float inValue);
+        
+        ///
+        /// When the mix percentage (mix time / mix duration) is less than the event threshold, event timelines for the animation
+        /// being mixed out will be applied. Defaults to 0, so event timelines are not applied for an animation being mixed out.
+        float getEventThreshold();
+        void setEventThreshold(float inValue);
+        
+        ///
+        /// When the mix percentage (mix time / mix duration) is less than the attachment threshold, attachment timelines for the
+        /// animation being mixed out will be applied. Defaults to 0, so attachment timelines are not applied for an animation being
+        /// mixed out.
+        float getAttachmentThreshold();
+        void setAttachmentThreshold(float inValue);
+        
+        ///
+        /// When the mix percentage (mix time / mix duration) is less than the draw order threshold, draw order timelines for the
+        /// animation being mixed out will be applied. Defaults to 0, so draw order timelines are not applied for an animation being
+        /// mixed out.
+        ///
+        float getDrawOrderThreshold();
+        void setDrawOrderThreshold(float inValue);
+        
+        ///
+        /// The animation queued to start after this animation, or NULL.
+        TrackEntry* getNext();
+        
+        ///
+        /// Returns true if at least one loop has been completed.
+        bool isComplete();
+        
+        ///
+        /// Seconds from 0 to the mix duration when mixing from the previous animation to this animation. May be slightly more than
+        /// TrackEntry.MixDuration when the mix is complete.
+        float getMixTime();
+        void setMixTime(float inValue);
+        
+        ///
+        /// Seconds for mixing from the previous animation to this animation. Defaults to the value provided by
+        /// AnimationStateData based on the animation before this animation (if any).
+        ///
+        /// The mix duration can be set manually rather than use the value from AnimationStateData.GetMix.
+        /// In that case, the mixDuration must be set before AnimationState.update(float) is next called.
+        ///
+        /// When using AnimationState::addAnimation(int, Animation, bool, float) with a delay
+        /// less than or equal to 0, note the Delay is set using the mix duration from the AnimationStateData
+        ///
+        ///
+        ///
+        float getMixDuration();
+        void setMixDuration(float inValue);
+        
+        ///
+        /// The track entry for the previous animation when mixing from the previous animation to this animation, or NULL if no
+        /// mixing is currently occuring. When mixing from multiple animations, MixingFrom makes up a linked list.
+        TrackEntry* getMixingFrom();
+        
+        ///
+        /// Resets the rotation directions for mixing this entry's rotate timelines. This can be useful to avoid bones rotating the
+        /// long way around when using alpha and starting animations on other tracks.
+        ///
+        /// Mixing involves finding a rotation between two others, which has two possible solutions: the short way or the long way around.
+        /// The two rotations likely change over time, so which direction is the short or long way also changes.
+        /// If the short way was always chosen, bones would flip to the other side when that direction became the long way.
+        /// TrackEntry chooses the short way the first time it is applied and remembers that direction.
+        void resetRotationDirections();
+        
+        void setOnAnimationEventFunc(OnAnimationEventFunc inValue);
+        
+    private:
+        Animation* _animation;
+        
+        TrackEntry* _next;
+        TrackEntry* _mixingFrom;
+        int _trackIndex;
+
+        bool _loop;
+        float _eventThreshold, _attachmentThreshold, _drawOrderThreshold;
+        float _animationStart, _animationEnd, _animationLast, _nextAnimationLast;
+        float _delay, _trackTime, _trackLast, _nextTrackLast, _trackEnd, _timeScale;
+        float _alpha, _mixTime, _mixDuration, _interruptAlpha, _totalAlpha;
+        Vector<int> _timelineData;
+        Vector<TrackEntry*> _timelineDipMix;
+        Vector<float> _timelinesRotation;
+        OnAnimationEventFunc _onAnimationEventFunc;
+        
+        /// Sets the timeline data.
+        /// @param to May be NULL.
+        TrackEntry* setTimelineData(TrackEntry* to, Vector<TrackEntry*>& mixingToArray, Vector<int>& propertyIDs);
+        
+        bool hasTimeline(int inId);
+        
+        void reset();
+    };
+    
+    class EventQueueEntry {
+        friend class EventQueue;
+        
+    public:
+        EventType _type;
+        TrackEntry* _entry;
+        Event* _event;
+        
+        EventQueueEntry(EventType eventType, TrackEntry* trackEntry, Event* event = NULL);
+    };
+    
+    class EventQueue {
+        friend class AnimationState;
+        
+    private:
+        Vector<EventQueueEntry*> _eventQueueEntries;
+        AnimationState& _state;
+        Pool<TrackEntry>& _trackEntryPool;
+        bool _drainDisabled;
+        
+        static EventQueue* newEventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool);
+
+        static EventQueueEntry* newEventQueueEntry(EventType eventType, TrackEntry* entry, Event* event = NULL);
+        
+        EventQueue(AnimationState& state, Pool<TrackEntry>& trackEntryPool);
+        
+        ~EventQueue();
+        
+        void start(TrackEntry* entry);
+
+        void interrupt(TrackEntry* entry);
+
+        void end(TrackEntry* entry);
+
+        void dispose(TrackEntry* entry);
+
+        void complete(TrackEntry* entry);
+
+        void event(TrackEntry* entry, Event* event);
+
+        /// Raises all events in the queue and drains the queue.
+        void drain();
+    };
+    
+    class AnimationState {
+        friend class TrackEntry;
+        friend class EventQueue;
+        
+    public:
+        AnimationState(AnimationStateData& data);
+        
+        ~AnimationState();
+        
+        ///
+        /// Increments the track entry times, setting queued animations as current if needed
+        /// @param delta delta time
+        void update(float delta);
+        
+        ///
+        /// Poses the skeleton using the track entry animations. There are no side effects other than invoking listeners, so the
+        /// animation state can be applied to multiple skeletons to pose them identically.
+        bool apply(Skeleton& skeleton);
+        
+        ///
+        /// Removes all animations from all tracks, leaving skeletons in their previous pose.
+        /// It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose,
+        /// rather than leaving them in their previous pose.
+        void clearTracks();
+        
+        ///
+        /// Removes all animations from the tracks, leaving skeletons in their previous pose.
+        /// It may be desired to use AnimationState.setEmptyAnimations(float) to mix the skeletons back to the setup pose,
+        /// rather than leaving them in their previous pose.
+        void clearTrack(int trackIndex);
+        
+        /// Sets an animation by name. setAnimation(int, Animation, bool)
+        TrackEntry* setAnimation(int trackIndex, std::string animationName, bool loop);
+        
+        /// Sets the current animation for a track, discarding any queued animations.
+        /// @param loop If true, the animation will repeat.
+        /// If false, it will not, instead its last frame is applied if played beyond its duration.
+        /// In either case TrackEntry.TrackEnd determines when the track is cleared.
+        /// @return
+        /// A track entry to allow further customization of animation playback. References to the track entry must not be kept
+        /// after AnimationState.Dispose.
+        TrackEntry* setAnimation(int trackIndex, Animation* animation, bool loop);
+        
+        /// Queues an animation by name.
+        /// addAnimation(int, Animation, bool, float)
+        TrackEntry* addAnimation(int trackIndex, std::string animationName, bool loop, float delay);
+        
+        /// Adds an animation to be played delay seconds after the current or last queued animation
+        /// for a track. If the track is empty, it is equivalent to calling setAnimation.
+        /// @param delay
+        /// Seconds to begin this animation after the start of the previous animation. May be &lt;= 0 to use the animation
+        /// duration of the previous track minus any mix duration plus the negative delay.
+        ///
+        /// @return A track entry to allow further customization of animation playback. References to the track entry must not be kept
+        /// after AnimationState.Dispose
+        TrackEntry* addAnimation(int trackIndex, Animation* animation, bool loop, float delay);
+        
+        ///
+        /// Sets an empty animation for a track, discarding any queued animations, and mixes to it over the specified mix duration.
+        TrackEntry* setEmptyAnimation(int trackIndex, float mixDuration);
+        
+        ///
+        /// Adds an empty animation to be played after the current or last queued animation for a track, and mixes to it over the
+        /// specified mix duration.
+        /// @return
+        /// A track entry to allow further customization of animation playback. References to the track entry must not be kept after AnimationState.Dispose.
+        ///
+        /// @param trackIndex Track number.
+        /// @param mixDuration Mix duration.
+        /// @param delay Seconds to begin this animation after the start of the previous animation. May be &lt;= 0 to use the animation
+        /// duration of the previous track minus any mix duration plus the negative delay.
+        TrackEntry* addEmptyAnimation(int trackIndex, float mixDuration, float delay);
+        
+        ///
+        /// Sets an empty animation for every track, discarding any queued animations, and mixes to it over the specified mix duration.
+        void setEmptyAnimations(float mixDuration);
+        
+        /// @return The track entry for the animation currently playing on the track, or NULL if no animation is currently playing.
+        TrackEntry* getCurrent(int trackIndex);
+        
+        AnimationStateData& getData();
+        
+        /// A list of tracks that have animations, which may contain NULLs.
+        Vector<TrackEntry*> getTracks();
+        float getTimeScale();
+        void setTimeScale(float inValue);
+        void setOnAnimationEventFunc(OnAnimationEventFunc inValue);
+        void setRendererObject(void* inValue);
+        void* getRendererObject();
+        
+    private:
+        static const int Subsequent, First, Dip, DipMix;
+        
+        AnimationStateData& _data;
+
+        Pool<TrackEntry> _trackEntryPool;
+        Vector<TrackEntry*> _tracks;
+        Vector<Event*> _events;
+        EventQueue* _queue;
+
+        Vector<int> _propertyIDs;
+        Vector<TrackEntry*> _mixingTo;
+        bool _animationsChanged;
+        
+        void* _rendererObject;
+
+        OnAnimationEventFunc _onAnimationEventFunc;
+        
+        float _timeScale;
+
+        static Animation* getEmptyAnimation();
+        
+        static void applyRotateTimeline(RotateTimeline* rotateTimeline, Skeleton& skeleton, float time, float alpha, MixPose pose, Vector<float>& timelinesRotation, int i, bool firstFrame);
+        
+        /// Returns true when all mixing from entries are complete.
+        bool updateMixingFrom(TrackEntry* to, float delta);
+        
+        float applyMixingFrom(TrackEntry* to, Skeleton& skeleton, MixPose currentPose);
+        
+        void queueEvents(TrackEntry* entry, float animationTime);
+        
+        /// Sets the active TrackEntry for a given track number.
+        void setCurrent(int index, TrackEntry* current, bool interrupt);
+
+        TrackEntry* expandToIndex(int index);
+
+        /// Object-pooling version of new TrackEntry. Obtain an unused TrackEntry from the pool and clear/initialize its values.
+        /// @param last May be NULL.
+        TrackEntry* newTrackEntry(int trackIndex, Animation* animation, bool loop, TrackEntry* last);
+
+        /// Dispose all track entries queued after the given TrackEntry.
+        void disposeNext(TrackEntry* entry);
+
+        void animationsChanged();
+    };
+}
+
+#endif /* Spine_AnimationState_h */

+ 91 - 0
spine-cpp/spine-cpp/include/spine/AnimationStateData.h

@@ -0,0 +1,91 @@
+/******************************************************************************
+ * 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_AnimationStateData_h
+#define Spine_AnimationStateData_h
+
+#include <spine/HashMap.h>
+
+#include <assert.h>
+#include <string>
+
+namespace Spine {
+    class SkeletonData;
+    class Animation;
+    
+    /// Stores mix (crossfade) durations to be applied when AnimationState animations are changed.
+    class AnimationStateData {
+        friend class AnimationState;
+        
+    public:
+        /// The SkeletonData to look up animations when they are specified by name.
+        SkeletonData& getSkeletonData();
+        
+        /// The mix duration to use when no mix duration has been specifically defined between two animations.
+        float getDefaultMix();
+        void setDefaultMix(float inValue);
+        
+        AnimationStateData(SkeletonData& skeletonData);
+        
+        /// Sets a mix duration by animation names.
+        void setMix(std::string fromName, std::string toName, float duration);
+        
+        /// Sets a mix duration when changing from the specified animation to the other.
+        /// See TrackEntry.MixDuration.
+        void setMix(Animation* from, Animation* to, float duration);
+        
+        ///
+        /// The mix duration to use when changing from the specified animation to the other,
+        /// or the DefaultMix if no mix duration has been set.
+        ///
+        float getMix(Animation* from, Animation* to);
+        
+    private:
+        class AnimationPair {
+        public:
+            Animation* _a1;
+            Animation* _a2;
+            
+            AnimationPair(Animation* a1 = NULL, Animation* a2 = NULL);
+            
+            bool operator==(const AnimationPair &other) const;
+        };
+        
+        struct HashAnimationPair {
+            std::size_t operator()(const Spine::AnimationStateData::AnimationPair& val) const;
+        };
+        
+        SkeletonData& _skeletonData;
+        float _defaultMix;
+        HashMap<AnimationPair, float, HashAnimationPair> _animationToMixTime;
+    };
+}
+
+#endif /* Spine_AnimationStateData_h */

+ 153 - 0
spine-cpp/spine-cpp/include/spine/Atlas.h

@@ -0,0 +1,153 @@
+/******************************************************************************
+ * 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_Atlas_h
+#define Spine_Atlas_h
+
+#include <spine/Vector.h>
+#include <spine/Extension.h>
+
+#include <string>
+
+namespace Spine {
+    enum Format {
+        Format_Alpha,
+        Format_Intensity,
+        Format_LuminanceAlpha,
+        Format_RGB565,
+        Format_RGBA4444,
+        Format_RGB888,
+        Format_RGBA8888
+    };
+    
+    enum TextureFilter {
+        TextureFilter_Nearest,
+        TextureFilter_Linear,
+        TextureFilter_MipMap,
+        TextureFilter_MipMapNearestNearest,
+        TextureFilter_MipMapLinearNearest,
+        TextureFilter_MipMapNearestLinear,
+        TextureFilter_MipMapLinearLinear
+    };
+    
+    enum TextureWrap {
+        TextureWrap_MirroredRepeat,
+        TextureWrap_ClampToEdge,
+        TextureWrap_Repeat
+    };
+    
+    class AtlasPage {
+    public:
+        std::string name;
+        Format format;
+        TextureFilter minFilter;
+        TextureFilter magFilter;
+        TextureWrap uWrap;
+        TextureWrap vWrap;
+        void* rendererObject;
+        int width, height;
+        
+        AtlasPage(std::string inName) : name(inName) {}
+    };
+    
+    class AtlasRegion {
+    public:
+        AtlasPage* page;
+        std::string name;
+        int x, y, width, height;
+        float u, v, u2, v2;
+        float offsetX, offsetY;
+        int originalWidth, originalHeight;
+        int index;
+        bool rotate;
+        Vector<int> splits;
+        Vector<int> pads;
+    };
+    
+    class TextureLoader;
+    
+    class Atlas {
+    public:
+        Atlas(const char* path, TextureLoader& textureLoader);
+        
+        Atlas(const char* data, int length, const char* dir, TextureLoader& textureLoader);
+        
+        ~Atlas();
+        
+        void flipV();
+        
+        /// Returns the first region found with the specified name. This method uses std::string comparison to find the region, so the result
+        /// should be cached rather than calling this method multiple times.
+        /// @return The region, or NULL.
+        AtlasRegion* findRegion(std::string name);
+        
+        void dispose();
+        
+    private:
+        Vector<AtlasPage*> _pages;
+        Vector<AtlasRegion*> _regions;
+        TextureLoader& _textureLoader;
+        
+        void load(const char* begin, int length, const char* dir);
+        
+        class Str {
+        public:
+            const char* begin;
+            const char* end;
+        };
+        
+        static void trim(Str* str);
+        
+        /// Tokenize string without modification. Returns 0 on failure
+        static int readLine(const char** begin, const char* end, Str* str);
+        
+        /// Moves str->begin past the first occurence of c. Returns 0 on failure
+        static int beginPast(Str* str, char c);
+        
+        /// Returns 0 on failure
+        static int readValue(const char** begin, const char* end, Str* str);
+        
+        /// Returns the number of tuple values read (1, 2, 4, or 0 for failure)
+        static int readTuple(const char** begin, const char* end, Str tuple[]);
+        
+        static char* mallocString(Str* str);
+        
+        static int indexOf(const char** array, int count, Str* str);
+        
+        static int equals(Str* str, const char* other);
+        
+        static int toInt(Str* str);
+        
+        static Atlas* abortAtlas(Atlas* atlas);
+    };
+}
+
+#endif /* Spine_Atlas_h */
+

+ 71 - 0
spine-cpp/spine-cpp/include/spine/AtlasAttachmentLoader.h

@@ -0,0 +1,71 @@
+/******************************************************************************
+ * 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_AtlasAttachmentLoader_h
+#define Spine_AtlasAttachmentLoader_h
+
+#include <spine/AttachmentLoader.h>
+
+#include <spine/Vector.h>
+
+namespace Spine {
+    class Atlas;
+    class AtlasRegion;
+    
+    ///
+    /// An AttachmentLoader that configures attachments using texture regions from an Atlas.
+    /// See http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data about Loading Skeleton Data in the Spine Runtimes Guide.
+    ///
+    class AtlasAttachmentLoader : public AttachmentLoader {
+        RTTI_DECL;
+        
+    public:
+        AtlasAttachmentLoader(Vector<Atlas*>& inAtlasArray);
+        
+        virtual RegionAttachment* newRegionAttachment(Skin& skin, std::string name, std::string path);
+        
+        virtual MeshAttachment* newMeshAttachment(Skin& skin, std::string name, std::string path);
+        
+        virtual BoundingBoxAttachment* newBoundingBoxAttachment(Skin& skin, std::string name);
+        
+        virtual PathAttachment* newPathAttachment(Skin& skin, std::string name);
+        
+        virtual PointAttachment* newPointAttachment(Skin& skin, std::string name);
+        
+        virtual ClippingAttachment* newClippingAttachment(Skin& skin, std::string name);
+        
+        AtlasRegion* findRegion(std::string name);
+        
+    private:
+        Vector<Atlas*> _atlasArray;
+    };
+}
+
+#endif /* Spine_AtlasAttachmentLoader_h */

+ 52 - 0
spine-cpp/spine-cpp/include/spine/Attachment.h

@@ -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_Attachment_h
+#define Spine_Attachment_h
+
+#include <spine/RTTI.h>
+
+#include <string>
+
+namespace Spine {
+    class Attachment {
+        RTTI_DECL;
+        
+    public:
+        Attachment(std::string name);
+        
+        const std::string& getName();
+        
+    private:
+        const std::string _name;
+    };
+}
+
+#endif /* Spine_Attachment_h */

+ 72 - 0
spine-cpp/spine-cpp/include/spine/AttachmentLoader.h

@@ -0,0 +1,72 @@
+/******************************************************************************
+ * 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_AttachmentLoader_h
+#define Spine_AttachmentLoader_h
+
+#include <spine/RTTI.h>
+
+#include <string>
+
+namespace Spine {
+    class Skin;
+    class RegionAttachment;
+    class MeshAttachment;
+    class BoundingBoxAttachment;
+    class PathAttachment;
+    class PointAttachment;
+    class ClippingAttachment;
+    
+    class AttachmentLoader {
+        RTTI_DECL;
+        
+        AttachmentLoader();
+        
+        virtual ~AttachmentLoader();
+        
+        /// @return May be NULL to not load any attachment.
+        virtual RegionAttachment* newRegionAttachment(Skin& skin, std::string name, std::string path) = 0;
+        
+        /// @return May be NULL to not load any attachment.
+        virtual MeshAttachment* newMeshAttachment(Skin& skin, std::string name, std::string path) = 0;
+        
+        /// @return May be NULL to not load any attachment.
+        virtual BoundingBoxAttachment* newBoundingBoxAttachment(Skin& skin, std::string name) = 0;
+        
+        /// @return May be NULL to not load any attachment
+        virtual PathAttachment* newPathAttachment(Skin& skin, std::string name) = 0;
+        
+        virtual PointAttachment* newPointAttachment(Skin& skin, std::string name) = 0;
+        
+        virtual ClippingAttachment* newClippingAttachment(Skin& skin, std::string name) = 0;
+    };
+}
+
+#endif /* Spine_AttachmentLoader_h */

+ 77 - 0
spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h

@@ -0,0 +1,77 @@
+/******************************************************************************
+ * 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_AttachmentTimeline_h
+#define Spine_AttachmentTimeline_h
+
+#include <spine/Timeline.h>
+
+#include <spine/Vector.h>
+#include <spine/MixPose.h>
+#include <spine/MixDirection.h>
+
+#include <string>
+
+namespace Spine {
+    class Skeleton;
+    class Event;
+    
+    class AttachmentTimeline : public Timeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        AttachmentTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, float time, std::string attachmentName);
+        
+        int getSlotIndex();
+        void setSlotIndex(int inValue);
+        Vector<float>& getFrames();
+        void setFrames(Vector<float>& inValue); // time, ...
+        Vector<std::string> getAttachmentNames();
+        void setAttachmentNames(Vector<std::string>& inValue);
+        int getFrameCount();
+        
+    private:
+        int _slotIndex;
+        Vector<float> _frames;
+        Vector<std::string> _attachmentNames;
+    };
+}
+
+#endif /* Spine_AttachmentTimeline_h */

+ 46 - 0
spine-cpp/spine-cpp/include/spine/AttachmentType.h

@@ -0,0 +1,46 @@
+/******************************************************************************
+ * 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_AttachmentType_h
+#define Spine_AttachmentType_h
+
+namespace Spine {
+    enum AttachmentType {
+        AttachmentType_Region,
+        AttachmentType_Boundingbox,
+        AttachmentType_Mesh,
+        AttachmentType_Linkedmesh,
+        AttachmentType_Path,
+        AttachmentType_Point,
+        AttachmentType_Clipping
+    };
+}
+
+#endif /* Spine_AttachmentType_h */

+ 43 - 0
spine-cpp/spine-cpp/include/spine/BlendMode.h

@@ -0,0 +1,43 @@
+/******************************************************************************
+ * 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_BlendMode_h
+#define Spine_BlendMode_h
+
+namespace Spine {
+    enum BlendMode {
+        BlendMode_Normal = 0,
+        BlendMode_Additive,
+        BlendMode_Multiply,
+        BlendMode_Screen
+    };
+}
+
+#endif /* Spine_BlendMode_h */

+ 206 - 0
spine-cpp/spine-cpp/include/spine/Bone.h

@@ -0,0 +1,206 @@
+/******************************************************************************
+ * 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_Bone_h
+#define Spine_Bone_h
+
+#include <spine/Updatable.h>
+
+#include <spine/Vector.h>
+
+namespace Spine {
+    class BoneData;
+    class Skeleton;
+    
+    /// Stores a bone's current pose.
+    ///
+    /// A bone has a local transform which is used to compute its world transform. A bone also has an applied transform, which is a
+    /// local transform that can be applied to compute the world transform. The local transform and applied transform may differ if a
+    /// constraint or application code modifies the world transform after it was computed from the local transform.
+    class Bone : public Updatable {
+        friend class AnimationState;
+        
+        friend class RotateTimeline;
+        friend class IkConstraint;
+        friend class TransformConstraint;
+        friend class VertexAttachment;
+        friend class PathConstraint;
+        friend class Skeleton;
+        friend class RegionAttachment;
+        friend class PointAttachment;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TranslateTimeline;
+        
+        RTTI_DECL;
+        
+    public:
+        static void setYDown(bool inValue);
+        
+        static bool isYDown();
+        
+        /// @param parent May be NULL.
+        Bone(BoneData& data, Skeleton& skeleton, Bone* parent = NULL);
+        
+        /// Same as updateWorldTransform. This method exists for Bone to implement Spine::Updatable.
+        virtual void update();
+        
+        /// Computes the world transform using the parent bone and this bone's local transform.
+        void updateWorldTransform();
+        
+        /// Computes the world transform using the parent bone and the specified local transform.
+        void updateWorldTransform(float x, float y, float rotation, float scaleX, float scaleY, float shearX, float shearY);
+        
+        void setToSetupPose();
+        
+        void worldToLocal(float worldX, float worldY, float& outLocalX, float& outLocalY);
+        
+        void localToWorld(float localX, float localY, float& outWorldX, float& outWorldY);
+        
+        float worldToLocalRotation(float worldRotation);
+        
+        float localToWorldRotation(float localRotation);
+        
+        ///
+        /// Rotates the world transform the specified amount and sets isAppliedValid to false.
+        ///
+        /// @param degrees Degrees.
+        void rotateWorld(float degrees);
+        
+        float getWorldToLocalRotationX();
+        
+        float getWorldToLocalRotationY();
+        
+        BoneData& getData();
+        Skeleton& getSkeleton();
+        Bone* getParent();
+        Vector<Bone*>& getChildren();
+        
+        /// The local X translation.
+        float getX();
+        void setX(float inValue);
+        
+        /// The local Y translation.
+        float getY();
+        void setY(float inValue);
+        
+        /// The local rotation.
+        float getRotation();
+        void setRotation(float inValue);
+        
+        /// The local scaleX.
+        float getScaleX();
+        void setScaleX(float inValue);
+        
+        /// The local scaleY.
+        float getScaleY();
+        void setScaleY(float inValue);
+        
+        /// The local shearX.
+        float getShearX();
+        void setShearX(float inValue);
+        
+        /// The local shearY.
+        float getShearY();
+        void setShearY(float inValue);
+        
+        /// The rotation, as calculated by any constraints.
+        float getAppliedRotation();
+        void setAppliedRotation(float inValue);
+        
+        /// The applied local x translation.
+        float getAX();
+        void setAX(float inValue);
+        
+        /// The applied local y translation.
+        float getAY();
+        void setAY(float inValue);
+        
+        /// The applied local scaleX.
+        float getAScaleX();
+        void setAScaleX(float inValue);
+        
+        /// The applied local scaleY.
+        float getAScaleY();
+        void setAScaleY(float inValue);
+        
+        /// The applied local shearX.
+        float getAShearX();
+        void setAShearX(float inValue);
+        
+        /// The applied local shearY.
+        float getAShearY();
+        void setAShearY(float inValue);
+        
+        float getA();
+        void setA(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getC();
+        void setC(float inValue);
+        float getD();
+        void setD(float inValue);
+        
+        float getWorldX();
+        void setWorldX(float inValue);
+        float getWorldY();
+        void setWorldY(float inValue);
+        float getWorldRotationX();
+        float getWorldRotationY();
+        
+        /// Returns the magnitide (always positive) of the world scale X.
+        float getWorldScaleX();
+        
+        /// Returns the magnitide (always positive) of the world scale Y.
+        float getWorldScaleY();
+        
+    private:
+        static bool yDown;
+        
+        BoneData& _data;
+        Skeleton& _skeleton;
+        Bone* _parent;
+        Vector<Bone*> _children;
+        float _x, _y, _rotation, _scaleX, _scaleY, _shearX, _shearY;
+        float _ax, _ay, _arotation, _ascaleX, _ascaleY, _ashearX, _ashearY;
+        bool _appliedValid;
+        float _a, _b, _worldX;
+        float _c, _d, _worldY;
+        bool _sorted;
+        
+        /// Computes the individual applied transform values from the world transform. This can be useful to perform processing using
+        /// the applied transform after the world transform has been modified directly (eg, by a constraint)..
+        ///
+        /// Some information is ambiguous in the world transform, such as -1,-1 scale versus 180 rotation.
+        void updateAppliedTransform();
+    };
+}
+
+#endif /* Spine_Bone_h */

+ 107 - 0
spine-cpp/spine-cpp/include/spine/BoneData.h

@@ -0,0 +1,107 @@
+/******************************************************************************
+ * 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_BoneData_h
+#define Spine_BoneData_h
+
+#include <spine/TransformMode.h>
+
+#include <string>
+
+namespace Spine {
+    class BoneData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        friend class AnimationState;
+        
+        friend class RotateTimeline;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TranslateTimeline;
+        
+    public:
+        BoneData(int index, std::string name, BoneData* parent = NULL);
+        
+        /// The index of the bone in Skeleton.Bones
+        const int getIndex();
+        
+        /// The name of the bone, which is unique within the skeleton.
+        const std::string& getName();
+        
+        /// May be NULL.
+        BoneData* getParent();
+        
+        float getLength();
+        void setLength(float inValue);
+        
+        /// Local X translation.
+        float getX();
+        void setX(float inValue);
+        
+        /// Local Y translation.
+        float getY();
+        void setY(float inValue);
+        
+        /// Local rotation.
+        float getRotation();
+        void setRotation(float inValue);
+        
+        /// Local scaleX.
+        float getScaleX();
+        void setScaleX(float inValue);
+        
+        /// Local scaleY.
+        float getScaleY();
+        void setScaleY(float inValue);
+        
+        /// Local shearX.
+        float getShearX();
+        void setShearX(float inValue);
+        
+        /// Local shearY.
+        float getShearY();
+        void setShearY(float inValue);
+        
+        /// The transform mode for how parent world transforms affect this bone.
+        TransformMode getTransformMode();
+        void setTransformMode(TransformMode inValue);
+        
+    private:
+        const int _index;
+        const std::string _name;
+        BoneData* _parent;
+        float _length;
+        float _x, _y, _rotation, _scaleX, _scaleY, _shearX, _shearY;
+        TransformMode _transformMode;
+    };
+}
+
+#endif /* Spine_BoneData_h */

+ 45 - 0
spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h

@@ -0,0 +1,45 @@
+/******************************************************************************
+ * 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_BoundingBoxAttachment_h
+#define Spine_BoundingBoxAttachment_h
+
+#include <spine/VertexAttachment.h>
+
+namespace Spine {
+    /// Attachment that has a polygon for bounds checking.
+    class BoundingBoxAttachment : public VertexAttachment {
+        RTTI_DECL;
+        
+        BoundingBoxAttachment(std::string name);
+    };
+}
+
+#endif /* Spine_BoundingBoxAttachment_h */

+ 58 - 0
spine-cpp/spine-cpp/include/spine/ClippingAttachment.h

@@ -0,0 +1,58 @@
+/******************************************************************************
+ * 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_ClippingAttachment_h
+#define Spine_ClippingAttachment_h
+
+#include <spine/VertexAttachment.h>
+
+namespace Spine {
+    class SlotData;
+    
+    class ClippingAttachment : public VertexAttachment {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        friend class SkeletonClipping;
+        
+        RTTI_DECL;
+        
+    public:
+        ClippingAttachment(std::string name);
+        
+        SlotData* getEndSlot();
+        void setEndSlot(SlotData* inValue);
+        
+    private:
+        SlotData* _endSlot;
+    };
+}
+
+#endif /* Spine_ClippingAttachment_h */

+ 70 - 0
spine-cpp/spine-cpp/include/spine/ColorTimeline.h

@@ -0,0 +1,70 @@
+/******************************************************************************
+ * 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_ColorTimeline_h
+#define Spine_ColorTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class ColorTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        static const int ENTRIES;
+        
+        ColorTimeline (int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, float time, float r, float g, float b, float a);
+        
+        int getSlotIndex();
+        void setSlotIndex(int inValue);
+        Vector<float>& getFrames();
+        void setFrames(Vector<float>& inValue); // time, r, g, b, a, ...
+        
+    protected:
+        static const int PREV_TIME, PREV_R, PREV_G, PREV_B, PREV_A;
+        static const int R, G, B, A;
+        
+    private:
+        int _slotIndex;
+        Vector<float> _frames;
+    };
+}
+
+#endif /* Spine_ColorTimeline_h */

+ 53 - 0
spine-cpp/spine-cpp/include/spine/Constraint.h

@@ -0,0 +1,53 @@
+/******************************************************************************
+ * 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_Constraint_h
+#define Spine_Constraint_h
+
+#include <spine/Updatable.h>
+
+namespace Spine {
+    /// The interface for all constraints.
+    class Constraint : public Updatable {
+        RTTI_DECL;
+        
+    public:
+        Constraint();
+        
+        virtual ~Constraint();
+        
+        virtual void update() = 0;
+        
+        /// The ordinal for the order a skeleton's constraints will be applied.
+        virtual int getOrder() = 0;
+    };
+}
+
+#endif /* Spine_Constraint_h */

+ 127 - 0
spine-cpp/spine-cpp/include/spine/ContainerUtil.h

@@ -0,0 +1,127 @@
+/******************************************************************************
+ * 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_ContainerUtil_h
+#define Spine_ContainerUtil_h
+
+#include <spine/Extension.h>
+#include <spine/Vector.h>
+#include <spine/HashMap.h>
+
+#include <string>
+#include <assert.h>
+
+namespace Spine {
+    class ContainerUtil {
+    public:
+        /// Finds an item by comparing each item's name.
+        /// It is more efficient to cache the results of this method than to call it multiple times.
+        /// @return May be NULL.
+        template<typename T>
+        static T* findWithName(Vector<T*>& items, std::string name) {
+            assert(name.length() > 0);
+            
+            for (T** i = items.begin(); i != items.end(); ++i) {
+                T* item = (*i);
+                if (item->getName() == name) {
+                    return item;
+                }
+            }
+            
+            return NULL;
+        }
+        
+        /// @return -1 if the item was not found.
+        template<typename T>
+        static int findIndexWithName(Vector<T*>& items, std::string name) {
+            assert(name.length() > 0);
+            
+            for (size_t i = 0, len = items.size(); i < len; ++i) {
+                T* item = items[i];
+                if (item->getName() == name) {
+                    return static_cast<int>(i);
+                }
+            }
+            
+            return -1;
+        }
+        
+        /// 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.
+        /// @return May be NULL.
+        template<typename T>
+        static T* findWithDataName(Vector<T*>& items, std::string name) {
+            assert(name.length() > 0);
+            
+            for (T** i = items.begin(); i != items.end(); ++i) {
+                T* item = (*i);
+                if (item->getData().getName() == name) {
+                    return item;
+                }
+            }
+            
+            return NULL;
+        }
+        
+        /// @return -1 if the item was not found.
+        template<typename T>
+        static int findIndexWithDataName(Vector<T*>& items, std::string name) {
+            assert(name.length() > 0);
+            
+            for (size_t i = 0, len = items.size(); i < len; ++i) {
+                T* item = items[i];
+                if (item->getData().getName() == name) {
+                    return static_cast<int>(i);
+                }
+            }
+            
+            return -1;
+        }
+        
+        template<typename T>
+        static void cleanUpVectorOfPointers(Vector<T*>& items) {
+            for (size_t i = 0; i < items.size(); ) {
+                T* item = items[i];
+                
+                DESTROY(T, item);
+                
+                items.erase(i);
+            }
+        }
+        
+    private:
+        // ctor, copy ctor, and assignment should be private in a Singleton
+        ContainerUtil();
+        ContainerUtil(const ContainerUtil&);
+        ContainerUtil& operator=(const ContainerUtil&);
+    };
+}
+
+#endif /* Spine_ContainerUtil_h */

+ 77 - 0
spine-cpp/spine-cpp/include/spine/CurveTimeline.h

@@ -0,0 +1,77 @@
+/******************************************************************************
+ * 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_CurveTimeline_h
+#define Spine_CurveTimeline_h
+
+#include <spine/Timeline.h>
+#include <spine/Vector.h>
+
+#include <assert.h>
+
+namespace Spine {
+    /// Base class for frames that use an interpolation bezier curve.
+    class CurveTimeline : public Timeline {
+        RTTI_DECL;
+        
+    public:
+        CurveTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) = 0;
+        
+        virtual int getPropertyId() = 0;
+        
+        int getFrameCount();
+        
+        void setLinear(int frameIndex);
+        
+        void setStepped(int frameIndex);
+        
+        /// Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next.
+        /// cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of
+        /// the difference between the keyframe's values.
+        void setCurve(int frameIndex, float cx1, float cy1, float cx2, float cy2);
+        
+        float getCurvePercent(int frameIndex, float percent);
+        
+        float getCurveType(int frameIndex);
+        
+    protected:
+        static const float LINEAR;
+        static const float STEPPED;
+        static const float BEZIER;
+        static const int BEZIER_SIZE;
+        
+    private:
+        Vector<float> _curves; // type, x, y, ...
+    };
+}
+
+#endif /* Spine_CurveTimeline_h */

+ 72 - 0
spine-cpp/spine-cpp/include/spine/DeformTimeline.h

@@ -0,0 +1,72 @@
+/******************************************************************************
+ * 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_DeformTimeline_h
+#define Spine_DeformTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class VertexAttachment;
+    
+    class DeformTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        DeformTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, float time, Vector<float>& vertices);
+        
+        int getSlotIndex();
+        void setSlotIndex(int inValue);
+        Vector<float>& getFrames();
+        void setFrames(Vector<float>& inValue); // time, ...
+        Vector< Vector<float> >& getVertices();
+        void setVertices(Vector< Vector<float> >& inValue);
+        VertexAttachment* getAttachment();
+        void setAttachment(VertexAttachment* inValue);
+        
+    private:
+        int _slotIndex;
+        Vector<float> _frames;
+        Vector< Vector<float> > _frameVertices;
+        VertexAttachment* _attachment;
+    };
+}
+
+#endif /* Spine_DeformTimeline_h */

+ 66 - 0
spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h

@@ -0,0 +1,66 @@
+/******************************************************************************
+ * 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_DrawOrderTimeline_h
+#define Spine_DrawOrderTimeline_h
+
+#include <spine/Timeline.h>
+
+namespace Spine {
+    class DrawOrderTimeline : public Timeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+    
+    public:
+        DrawOrderTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        /// @param drawOrder May be NULL to use bind pose draw order
+        void setFrame(int frameIndex, float time, Vector<int>& drawOrder);
+        
+        Vector<float>& getFrames();
+        void setFrames(Vector<float>& inValue); // time, ...
+        Vector< Vector<int> >& getDrawOrders();
+        void setDrawOrders(Vector< Vector<int> >& inValue);
+        int getFrameCount();
+    
+    private:
+        Vector<float> _frames;
+        Vector< Vector<int> > _drawOrders;
+    };
+}
+
+#endif /* Spine_DrawOrderTimeline_h */

+ 71 - 0
spine-cpp/spine-cpp/include/spine/Event.h

@@ -0,0 +1,71 @@
+/******************************************************************************
+ * 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_Event_h
+#define Spine_Event_h
+
+#include <string>
+
+namespace Spine {
+    class EventData;
+    
+    /// Stores the current pose values for an Event.
+    class Event {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class AnimationState;
+        
+    public:
+        Event(float time, const EventData& data);
+        
+        const EventData& getData();
+        
+        /// The animation time this event was keyed.
+        float getTime();
+        
+        int getIntValue();
+        void setIntValue(int inValue);
+        
+        float getFloatValue();
+        void setFloatValue(int inValue);
+        
+        std::string getStringValue();
+        void setStringValue(std::string inValue);
+        
+    private:
+        const EventData& _data;
+        const float _time;
+        int _intValue;
+        float _floatValue;
+        std::string _stringValue;
+    };
+}
+
+#endif /* Spine_Event_h */

+ 66 - 0
spine-cpp/spine-cpp/include/spine/EventData.h

@@ -0,0 +1,66 @@
+/******************************************************************************
+ * 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_EventData_h
+#define Spine_EventData_h
+
+#include <string>
+
+namespace Spine {
+    /// Stores the setup pose values for an Event.
+    class EventData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class Event;
+        
+    public:
+        EventData(std::string name);
+        
+        /// The name of the event, which is unique within the skeleton.
+        const std::string& getName();
+        
+        int getIntValue();
+        void setIntValue(int inValue);
+        
+        float getFloatValue();
+        void setFloatValue(float inValue);
+        
+        std::string getStringValue();
+        void setStringValue(std::string inValue);
+        
+    private:
+        const std::string _name;
+        int _intValue;
+        float _floatValue;
+        std::string _stringValue;
+    };
+}
+
+#endif /* Spine_EventData_h */

+ 67 - 0
spine-cpp/spine-cpp/include/spine/EventTimeline.h

@@ -0,0 +1,67 @@
+/******************************************************************************
+ * 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_EventTimeline_h
+#define Spine_EventTimeline_h
+
+#include <spine/Timeline.h>
+
+namespace Spine {
+    class EventTimeline : public Timeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        EventTimeline(int frameCount);
+        
+        ~EventTimeline();
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, Event* event);
+        
+        Vector<float> getFrames();
+        void setFrames(Vector<float>& inValue);
+        Vector<Event*>& getEvents();
+        void setEvents(Vector<Event*>& inValue);
+        int getFrameCount();
+        
+    private:
+        Vector<float> _frames;
+        Vector<Event*> _events;
+    };
+}
+
+#endif /* Spine_EventTimeline_h */

+ 97 - 0
spine-cpp/spine-cpp/include/spine/Extension.h

@@ -0,0 +1,97 @@
+/******************************************************************************
+ * 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_Extension_h
+#define Spine_Extension_h
+
+#include <stdlib.h>
+
+#define SPINE_EXTENSION (SpineExtension::getInstance())
+
+/* All allocation uses these. */
+#define MALLOC(TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineAlloc(sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
+#define CALLOC(TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineCalloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
+#define NEW(TYPE) CALLOC(TYPE,1)
+#define REALLOC(PTR,TYPE,COUNT) ((TYPE*)SPINE_EXTENSION->spineRealloc(PTR, sizeof(TYPE) * (COUNT), __FILE__, __LINE__))
+
+/* Frees memory. Can be used on const types. */
+#define FREE(VALUE) SPINE_EXTENSION->spineFree((void*)VALUE)
+
+/* Call destructor and then frees memory. Can be used on const types. */
+#define DESTROY(TYPE,VALUE) VALUE->~TYPE(); SPINE_EXTENSION->spineFree((void*)VALUE)
+
+namespace Spine {
+    class SpineExtension {
+    public:
+        static void setInstance(SpineExtension* inSpineExtension);
+        
+        static SpineExtension* getInstance();
+        
+        virtual ~SpineExtension();
+        
+        /// Implement this function to use your own memory allocator
+        virtual void* spineAlloc(size_t size, const char* file, int line) = 0;
+        
+        virtual void* spineCalloc(size_t num, size_t size, const char* file, int line) = 0;
+        
+        virtual void* spineRealloc(void* ptr, size_t size, const char* file, int line) = 0;
+        
+        /// If you provide a spineAllocFunc, you should also provide a spineFreeFunc
+        virtual void spineFree(void* mem) = 0;
+        
+        virtual char* spineReadFile(const char* path, int* length);
+        
+    protected:
+        SpineExtension();
+        
+    private:
+        static SpineExtension* _instance;
+    };
+    
+    class DefaultSpineExtension : public SpineExtension {
+    public:
+        static DefaultSpineExtension* getInstance();
+        
+        virtual ~DefaultSpineExtension();
+        
+        virtual void* spineAlloc(size_t size, const char* file, int line);
+        
+        virtual void* spineCalloc(size_t num, size_t size, const char* file, int line);
+        
+        virtual void* spineRealloc(void* ptr, size_t size, const char* file, int line);
+        
+        virtual void spineFree(void* mem);
+        
+    protected:
+        DefaultSpineExtension();
+    };
+}
+
+#endif /* Spine_Extension_h */

+ 300 - 0
spine-cpp/spine-cpp/include/spine/HashMap.h

@@ -0,0 +1,300 @@
+/******************************************************************************
+ * 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_HashMap_h
+#define Spine_HashMap_h
+
+#include <spine/Extension.h>
+#include <spine/Vector.h>
+
+namespace Spine {
+    template <typename K, typename V, typename H>
+    class HashMap {
+    private:
+        class Entry;
+        
+    public:
+        class Iterator {
+            friend class HashMap;
+            
+        public:
+            Iterator(Entry* entry = NULL) : _entry(entry) {
+                // Empty
+            }
+            
+            Iterator& operator++() {
+                _entry = _entry->next;
+                return *this;
+            }
+            
+            Iterator& operator--() {
+                _entry = _entry->prev;
+                return *this;
+            }
+            
+            bool operator==(const Iterator& p) const {
+                return _entry == p._entry;
+            }
+            
+            bool operator!=(const Iterator& p) const {
+                return _entry != p._entry;
+            }
+            
+            K& first() {
+                return _entry->_key;
+            }
+            
+            V& second() {
+                return _entry->_value;
+            }
+            
+        private:
+            Entry* _entry;
+        };
+        
+        HashMap(size_t capacity = 65535) :
+        _hashFunction(),
+        _capacity(capacity),
+        _header(),
+        _trailer(),
+        _hashSize(0) {
+            _hashTable.reserve(capacity);
+            for (int i = 0; i < _capacity; ++i) {
+                _hashTable.push_back(Entry());
+            }
+            
+            _header.prev = &_header;
+            _header.next = &_trailer;
+            _trailer.prev = &_header;
+            _trailer.next = &_trailer;
+        }
+        
+        ~HashMap() {
+            _hashSize = 0;
+        }
+        
+        size_t size() {
+            return _hashSize;
+        }
+        
+        Iterator begin() {
+            return Iterator(_header.next);
+        }
+        
+        Iterator end() {
+            return Iterator(&_trailer);
+        }
+        
+        Iterator rbegin() {
+            return Iterator(_trailer.prev);
+        }
+        
+        Iterator rend() {
+            return Iterator(_header);
+        }
+        
+        std::pair<Iterator, bool> insert(const K& key, const V& value) {
+            Iterator iter = find(key);
+            
+            if (iter._entry != &_trailer) {
+                return std::make_pair(iter, false);
+            }
+            
+            size_t index = hash(key);
+            
+            Entry* entry = NEW(Entry);
+            new (entry) Entry();
+            entry->_key = key;
+            entry->_value = value;
+            
+            _hashSize++;
+            
+            if (_header.next == (&_trailer)) {
+                _hashTable[index].next = entry;
+                _hashTable[index].prev = entry;
+                _header.next = entry;
+                entry->prev = &_header;
+                entry->next = &_trailer;
+                _trailer.prev = entry;
+                
+                return std::make_pair(Iterator(entry), true);
+            }
+            
+            if (_hashTable[index].next == NULL) {
+                _hashTable[index].next = entry;
+                _hashTable[index].prev = entry;
+                if (index < hash(_header.next->_key)) {
+                    entry->next = _header.next;
+                    entry->prev = &_header;
+                    _header.next->prev = entry;
+                    _header.next = entry;
+                }
+                else {
+                    entry->next = &_trailer;
+                    entry->prev = _trailer.prev;
+                    _trailer.prev = entry;
+                    entry->prev->next = entry;
+                }
+                
+                return std::make_pair(Iterator(entry), true);
+            }
+            
+            if (index == hash(_header.next->_key)) {
+                _header.next = entry;
+                entry->next = _hashTable[index].next;
+                entry->prev = &_header;
+                _hashTable[index].next->prev = entry;
+                _hashTable[index].next = entry;
+            }
+            else {
+                entry->next = _hashTable[index].next;
+                entry->prev = _hashTable[index].next->prev;
+                entry->next->prev = entry;
+                entry->prev->next = entry;
+                _hashTable[index].next = entry;
+            }
+            
+            return std::make_pair(Iterator(entry), true);
+        }
+        
+        Iterator find(const K& key) {
+            const size_t index = hash(key);
+            Iterator iter(_hashTable[index].next);
+            
+            if (iter._entry != NULL) {
+                for ( ; hash(iter._entry->_key) == index ; ++iter) {
+                    if (iter._entry->_key == key) {
+                        return iter;
+                    }
+                }
+            }
+            
+            return Iterator(&_trailer);
+        }
+        
+        Iterator erase(Iterator pos) {
+            if (pos._entry != &_header && pos._entry != &_trailer) {
+                Entry* next = pos._entry->next;
+                
+                size_t index = hash(pos._entry->_key);
+                
+                if (_hashTable[index].next == pos._entry && _hashTable[index].prev == pos._entry) {
+                    _hashTable[index].next = NULL;
+                    _hashTable[index].prev = NULL;
+                    
+                    if (_header.next == pos._entry) {
+                        _header.next = pos._entry->next;
+                        pos._entry->next->prev = &_header;
+                    }
+                    else if (_trailer.prev == pos._entry) {
+                        _trailer.prev = pos._entry->prev;
+                        pos._entry->prev->next = &_trailer;
+                    }
+                    else {
+                        pos._entry->prev->next = pos._entry->next;
+                        pos._entry->next->prev = pos._entry->prev;
+                    }
+                    
+                    DESTROY(Entry, pos._entry);
+                }
+                else if (_hashTable[index].next == pos._entry) {
+                    _hashTable[index].next = pos._entry->next;
+                    if (_header.next == pos._entry) {
+                        _header.next = pos._entry->next;
+                        pos._entry->next->prev = &_header;
+                    }
+                    else {
+                        pos._entry->prev->next = pos._entry->next;
+                        pos._entry->next->prev = pos._entry->prev;
+                    }
+                    
+                    DESTROY(Entry, pos._entry);
+                }
+                else if (_hashTable[index].prev == pos._entry) {
+                    _hashTable[index].prev = pos._entry->prev;
+                    if (_trailer.prev == pos._entry) {
+                        _trailer.prev = pos._entry->prev;
+                        pos._entry->prev->next = &_trailer;
+                    }
+                    else {
+                        pos._entry->prev->next = pos._entry->next;
+                        pos._entry->next->prev = pos._entry->prev;
+                    }
+                    
+                    DESTROY(Entry, pos._entry);
+                }
+                else {
+                    pos._entry->prev->next = pos._entry->next;
+                    pos._entry->next->prev = pos._entry->prev;
+                    
+                    DESTROY(Entry, pos._entry);
+                }
+                
+                _hashSize--;
+                
+                return Iterator(next);
+            }
+            
+            return Iterator(&_trailer);
+        }
+        
+        V operator[](const K& key) {
+            Iterator iter = find(key);
+            
+            if (iter._entry != _trailer) {
+                return iter._entry->_value;
+            }
+            
+            return V();
+        }
+        
+    private:
+        class Entry {
+        public:
+            K _key;
+            V _value;
+            Entry* next;
+            Entry* prev;
+        };
+        
+        const H _hashFunction;
+        const size_t _capacity;
+        Vector<Entry> _hashTable;
+        Entry _header;
+        Entry _trailer;
+        size_t _hashSize;
+        
+        size_t hash(const K& key) {
+            return _hashFunction(key) % _capacity;
+        }
+    };
+}
+
+#endif /* Spine_HashMap_h */

+ 90 - 0
spine-cpp/spine-cpp/include/spine/IkConstraint.h

@@ -0,0 +1,90 @@
+/******************************************************************************
+ * 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_IkConstraint_h
+#define Spine_IkConstraint_h
+
+#include <spine/Constraint.h>
+
+#include <spine/Vector.h>
+
+namespace Spine {
+    class IkConstraintData;
+    class Skeleton;
+    class Bone;
+    
+    class IkConstraint : public Constraint {
+        friend class Skeleton;
+        friend class IkConstraintTimeline;
+        
+        RTTI_DECL;
+        
+    public:
+        /// Adjusts the bone rotation so the tip is as close to the target position as possible. The target is specified
+        /// in the world coordinate system.
+        static void apply(Bone& bone, float targetX, float targetY, float alpha);
+        
+        /// Adjusts the parent and child bone rotations so the tip of the child is as close to the target position as
+        /// possible. The target is specified in the world coordinate system.
+        /// @param child A direct descendant of the parent bone.
+        static void apply(Bone& parent, Bone& child, float targetX, float targetY, int bendDir, float alpha);
+        
+        IkConstraint(IkConstraintData& data, Skeleton& skeleton);
+        
+        /// Applies the constraint to the constrained bones.
+        void apply();
+        
+        virtual void update();
+        
+        virtual int getOrder();
+        
+        IkConstraintData& getData();
+        
+        Vector<Bone*>& getBones();
+        
+        Bone* getTarget();
+        void setTarget(Bone* inValue);
+        
+        int getBendDirection();
+        void setBendDirection(int inValue);
+        
+        float getMix();
+        void setMix(float inValue);
+        
+    private:
+        IkConstraintData& _data;
+        Vector<Bone*> _bones;
+        float _mix;
+        int _bendDirection;
+        Bone* _target;
+    };
+}
+
+#endif /* Spine_IkConstraint_h */

+ 81 - 0
spine-cpp/spine-cpp/include/spine/IkConstraintData.h

@@ -0,0 +1,81 @@
+/******************************************************************************
+ * 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_IkConstraintData_h
+#define Spine_IkConstraintData_h
+
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class BoneData;
+    
+    class IkConstraintData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class IkConstraint;
+        friend class Skeleton;
+        friend class IkConstraintTimeline;
+        
+    public:
+        IkConstraintData(std::string name);
+        
+        /// The IK constraint's name, which is unique within the skeleton.
+        const std::string& getName();
+        
+        int getOrder();
+        void setOrder(int inValue);
+        
+        /// The bones that are constrained by this IK Constraint.
+        Vector<BoneData*>& getBones();
+        
+        /// The bone that is the IK target.
+        BoneData* getTarget();
+        void setTarget(BoneData* inValue);
+        
+        /// Controls the bend direction of the IK bones, either 1 or -1.
+        int getBendDirection();
+        void setBendDirection(int inValue);
+        
+        float getMix();
+        void setMix(float inValue);
+        
+    private:
+        const std::string _name;
+        int _order;
+        Vector<BoneData*> _bones;
+        BoneData* _target;
+        int _bendDirection;
+        float _mix;
+    };
+}
+
+#endif /* Spine_IkConstraintData_h */

+ 64 - 0
spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h

@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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_IkConstraintTimeline_h
+#define Spine_IkConstraintTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class IkConstraintTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        static const int ENTRIES;
+        
+        IkConstraintTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time, mix and bend direction of the specified keyframe.
+        void setFrame (int frameIndex, float time, float mix, int bendDirection);
+        
+    private:
+        static const int PREV_TIME, PREV_MIX, PREV_BEND_DIRECTION;
+        static const int MIX, BEND_DIRECTION;
+        
+        Vector<float> _frames;
+        int _ikConstraintIndex;
+    };
+}
+
+#endif /* Spine_IkConstraintTimeline_h */

+ 110 - 0
spine-cpp/spine-cpp/include/spine/Json.h

@@ -0,0 +1,110 @@
+/******************************************************************************
+ * 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_Json_h
+#define Spine_Json_h
+
+#ifndef SPINE_JSON_HAVE_PREV
+/* Spine doesn't use the "prev" link in the Json sibling lists. */
+#define SPINE_JSON_HAVE_PREV 0
+#endif
+
+namespace Spine {
+    class Json {
+        friend class SkeletonJson;
+        
+    public:
+        /* Json Types: */
+        static const int JSON_FALSE;
+        static const int JSON_TRUE;
+        static const int JSON_NULL;
+        static const int JSON_NUMBER;
+        static const int JSON_STRING;
+        static const int JSON_ARRAY;
+        static const int JSON_OBJECT;
+        
+        /* Get item "string" from object. Case insensitive. */
+        static Json* getItem(Json *object, const char* string);
+        
+        static const char* getString(Json *object, const char* name, const char* defaultValue);
+        
+        static float getFloat(Json *object, const char* name, float defaultValue);
+        
+        static int getInt(Json *object, const char* name, int defaultValue);
+        
+        /* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when Json_create() returns 0. 0 when Json_create() succeeds. */
+        static const char* getError();
+        
+        /* Supply a block of JSON, and this returns a Json object you can interrogate. Call Json_dispose when finished. */
+        Json(const char* value);
+        
+        ~Json();
+        
+    private:
+        static const char* _error;
+        
+        Json* _next;
+#if SPINE_JSON_HAVE_PREV
+        Json* _prev; /* next/prev allow you to walk array/object chains. Alternatively, use getSize/getItem */
+#endif
+        Json* _child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
+        
+        int _type; /* The type of the item, as above. */
+        int _size; /* The number of children. */
+        
+        const char* _valueString; /* The item's string, if type==JSON_STRING */
+        int _valueInt; /* The item's number, if type==JSON_NUMBER */
+        float _valueFloat; /* The item's number, if type==JSON_NUMBER */
+        
+        const char* _name; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
+        
+        /* Utility to jump whitespace and cr/lf */
+        static const char* skip(const char* inValue);
+        
+        /* Parser core - when encountering text, process appropriately. */
+        static const char* parseValue(Json *item, const char* value);
+        
+        /* Parse the input text into an unescaped cstring, and populate item. */
+        static const char* parseString(Json *item, const char* str);
+        
+        /* Parse the input text to generate a number, and populate the result into item. */
+        static const char* parseNumber(Json *item, const char* num);
+        
+        /* Build an array from input text. */
+        static const char* parseArray(Json *item, const char* value);
+        
+        /* Build an object from the text. */
+        static const char* parseObject(Json *item, const char* value);
+        
+        static int json_strcasecmp(const char* s1, const char* s2);
+    };
+}
+
+#endif /* Spine_Json_h */

+ 54 - 0
spine-cpp/spine-cpp/include/spine/LinkedMesh.h

@@ -0,0 +1,54 @@
+/******************************************************************************
+ * 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_LinkedMesh_h
+#define Spine_LinkedMesh_h
+
+#include <string>
+
+namespace Spine {
+    class MeshAttachment;
+    
+    class LinkedMesh {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+    public:
+        LinkedMesh(MeshAttachment* mesh, std::string skin, int slotIndex, std::string parent);
+        
+    private:
+        MeshAttachment* _mesh;
+        std::string _skin;
+        int _slotIndex;
+        std::string _parent;
+    };
+}
+
+#endif /* Spine_LinkedMesh_h */

+ 106 - 0
spine-cpp/spine-cpp/include/spine/MathUtil.h

@@ -0,0 +1,106 @@
+/******************************************************************************
+ * 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_MathUtil_h
+#define Spine_MathUtil_h
+
+#include <math.h>
+#include <float.h>
+
+#define SPINE_PI 3.1415927f
+#define SPINE_PI_2 SPINE_PI * 2
+#define RadDeg 180.0f / SPINE_PI
+#define DegRad SPINE_PI / 180.0f
+#define SIN_BITS 14 // 16KB. Adjust for accuracy.
+#define SIN_MASK ~(-(1 << SIN_BITS))
+#define SIN_COUNT SIN_MASK + 1
+#define RadFull SPINE_PI * 2
+#define DegFull 360
+#define RadToIndex SIN_COUNT / RadFull
+#define DegToIndex SIN_COUNT / DegFull
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+
+namespace Spine {
+    template <typename T>
+    int sign(T val) {
+        return (T(0) < val) - (val < T(0));
+    }
+    
+    inline bool areFloatsPracticallyEqual(float A, float B, float maxDiff = 0.0000000000000001f, float maxRelDiff = FLT_EPSILON) {
+        // Check if the numbers are really close -- needed
+        // when comparing numbers near zero.
+        float diff = fabs(A - B);
+        if (diff <= maxDiff) {
+            return true;
+        }
+        
+        A = fabs(A);
+        B = fabs(B);
+        
+        float largest = (B > A) ? B : A;
+        
+        if (diff <= largest * maxRelDiff) {
+            return true;
+        }
+        
+        return false;
+    }
+    
+    inline float clamp(float x, float lower, float upper) {
+        return fminf(upper, fmaxf(x, lower));
+    }
+    
+    class MathUtil {
+    public:
+        MathUtil();
+        
+        /// Returns the sine in radians from a lookup table.
+        static float sin(float radians);
+        
+        /// Returns the cosine in radians from a lookup table.
+        static float cos(float radians);
+        
+        /// Returns the sine in radians from a lookup table.
+        static float sinDeg(float degrees);
+        
+        /// Returns the cosine in radians from a lookup table.
+        static float cosDeg(float degrees);
+        
+        /// Returns atan2 in radians, faster but less accurate than Math.Atan2. Average error of 0.00231 radians (0.1323
+        /// degrees), largest error of 0.00488 radians (0.2796 degrees).
+        static float atan2(float y, float x);
+    
+    private:
+        static float SIN_TABLE[SIN_COUNT];
+    };
+}
+
+#endif /* Spine_MathUtil_h */

+ 155 - 0
spine-cpp/spine-cpp/include/spine/MeshAttachment.h

@@ -0,0 +1,155 @@
+/******************************************************************************
+ * 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_MeshAttachment_h
+#define Spine_MeshAttachment_h
+
+#include <spine/VertexAttachment.h>
+
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    /// Attachment that displays a texture region using a mesh.
+    class MeshAttachment : public VertexAttachment {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class AtlasAttachmentLoader;
+        
+        RTTI_DECL;
+        
+    public:
+        MeshAttachment(std::string name);
+
+        void updateUVs();
+
+        virtual bool applyDeform(VertexAttachment* sourceAttachment);
+        
+        int getHullLength();
+        void setHullLength(float inValue);
+        
+        Vector<float>& getRegionUVs();
+        void setRegionUVs(Vector<float>& inValue);
+        
+        /// The UV pair for each vertex, normalized within the entire texture. See also MeshAttachment::updateUVs
+        Vector<float>& getUVs();
+        void setUVs(Vector<float>& inValue);
+        
+        Vector<short>& getTriangles();
+        void setTriangles(Vector<short>& inValue);
+        
+        float getR();
+        void setR(float inValue);
+        float getG();
+        void setG(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getA();
+        void setA(float inValue);
+        
+        std::string getPath();
+        void setPath(std::string inValue);
+        void* getRendererObject();
+        void setRendererObject(void* inValue);
+        
+        float getRegionU();
+        void setRegionU(float inValue);
+        
+        float getRegionV();
+        void setRegionV(float inValue);
+        
+        float getRegionU2();
+        void setRegionU2(float inValue);
+        
+        float getRegionV2();
+        void setRegionV2(float inValue);
+        
+        bool getRegionRotate();
+        void setRegionRotate(float inValue);
+        
+        float getRegionOffsetX();
+        void setRegionOffsetX(float inValue);
+        
+        // Pixels stripped from the bottom left, unrotated.
+        float getRegionOffsetY();
+        void setRegionOffsetY(float inValue);
+        
+        float getRegionWidth();
+        void setRegionWidth(float inValue);
+        
+        // Unrotated, stripped size.
+        float getRegionHeight();
+        void setRegionHeight(float inValue);
+        
+        float getRegionOriginalWidth();
+        void setRegionOriginalWidth(float inValue);
+        
+        // Unrotated, unstripped size.
+        float getRegionOriginalHeight();
+        void setRegionOriginalHeight(float inValue);
+        
+        bool getInheritDeform();
+        void setInheritDeform(bool inValue);
+        
+        MeshAttachment* getParentMesh();
+        void setParentMesh(MeshAttachment* inValue);
+        
+        // Nonessential.
+        Vector<short>& getEdges();
+        void setEdges(Vector<short>& inValue);
+        float getWidth();
+        void setWidth(float inValue);
+        float getHeight();
+        void setHeight(float inValue);
+
+    private:
+        float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight;
+        MeshAttachment* _parentMesh;
+        Vector<float> _uvs;
+        Vector<float> _regionUVs;
+        Vector<short> _triangles;
+        Vector<short> _edges;
+        void* _rendererObject;
+        std::string _path;
+        float _regionU;
+        float _regionV;
+        float _regionU2;
+        float _regionV2;
+        float _width;
+        float _height;
+        float _r, _g, _b, _a;
+        int _hullLength;
+        bool _inheritDeform;
+        bool _regionRotate;
+    };
+}
+
+#endif /* Spine_MeshAttachment_h */

+ 44 - 0
spine-cpp/spine-cpp/include/spine/MixDirection.h

@@ -0,0 +1,44 @@
+/******************************************************************************
+ * 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_MixDirection_h
+#define Spine_MixDirection_h
+
+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).
+    /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
+    enum MixDirection {
+        MixDirection_In = 0,
+        MixDirection_Out
+    };
+}
+
+#endif /* Spine_MixDirection_h */

+ 49 - 0
spine-cpp/spine-cpp/include/spine/MixPose.h

@@ -0,0 +1,49 @@
+/******************************************************************************
+ * 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_MixPose_h
+#define Spine_MixPose_h
+
+namespace Spine {
+    ///
+    /// Controls how a timeline is mixed with the setup or current pose.
+    /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
+    enum MixPose {
+        ///  The timeline value is mixed with the setup pose (the current pose is not used).
+        MixPose_Setup = 0,
+        ///  The timeline value is mixed with the current pose. The setup pose is used as the timeline value before the first key,
+        /// except for timelines which perform instant transitions, such as DrawOrderTimeline or AttachmentTimeline.
+        MixPose_Current,
+        ///  The timeline value is mixed with the current pose. No change is made before the first key (the current pose is kept until the first key).
+        MixPose_CurrentLayered
+    };
+}
+
+#endif /* Spine_MixPose_h */

+ 61 - 0
spine-cpp/spine-cpp/include/spine/PathAttachment.h

@@ -0,0 +1,61 @@
+/******************************************************************************
+ * 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_PathAttachment_h
+#define Spine_PathAttachment_h
+
+#include <spine/VertexAttachment.h>
+
+namespace Spine {
+    class PathAttachment : public VertexAttachment {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        PathAttachment(std::string name);
+        
+        /// The length in the setup pose from the start of the path to the end of each curve.
+        Vector<float>& getLengths();
+        void setLengths(Vector<float> inValue);
+        bool isClosed();
+        void setClosed(bool inValue);
+        bool isConstantSpeed();
+        void setConstantSpeed(bool inValue);
+        
+    private:
+        Vector<float> _lengths;
+        bool _closed;
+        bool _constantSpeed;
+    };
+}
+
+#endif /* Spine_PathAttachment_h */

+ 110 - 0
spine-cpp/spine-cpp/include/spine/PathConstraint.h

@@ -0,0 +1,110 @@
+/******************************************************************************
+ * 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_PathConstraint_h
+#define Spine_PathConstraint_h
+
+#include <spine/Constraint.h>
+
+#include <spine/Vector.h>
+
+namespace Spine {
+    class PathConstraintData;
+    class Skeleton;
+    class PathAttachment;
+    class Bone;
+    class Slot;
+    
+    class PathConstraint : public Constraint {
+        friend class Skeleton;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        
+        RTTI_DECL;
+        
+    public:
+        PathConstraint(PathConstraintData& data, Skeleton& skeleton);
+        
+        /// Applies the constraint to the constrained bones.
+        void apply();
+        
+        virtual void update();
+        
+        virtual int getOrder();
+        
+        float getPosition();
+        void setPosition(float inValue);
+        
+        float getSpacing();
+        void setSpacing(float inValue);
+        
+        float getRotateMix();
+        void setRotateMix(float inValue);
+        
+        float getTranslateMix();
+        void setTranslateMix(float inValue);
+        
+        Vector<Bone*>& getBones();
+        
+        Slot* getTarget();
+        void setTarget(Slot* inValue);
+        
+        PathConstraintData& getData();
+        
+    private:
+        static const float EPSILON;
+        static const int NONE;
+        static const int BEFORE;
+        static const int AFTER;
+        
+        PathConstraintData& _data;
+        Vector<Bone*> _bones;
+        Slot* _target;
+        float _position, _spacing, _rotateMix, _translateMix;
+        
+        Vector<float> _spaces;
+        Vector<float> _positions;
+        Vector<float> _world;
+        Vector<float> _curves;
+        Vector<float> _lengths;
+        Vector<float> _segments;
+        
+        Vector<float> computeWorldPositions(PathAttachment& path, int spacesCount, bool tangents, bool percentPosition, bool percentSpacing);
+        
+        static void addBeforePosition(float p, Vector<float>& temp, int i, Vector<float>& output, int o);
+        
+        static void addAfterPosition(float p, Vector<float>& temp, int i, Vector<float>& output, int o);
+        
+        static void addCurvePosition(float p, float x1, float y1, float cx1, float cy1, float cx2, float cy2, float x2, float y2, Vector<float>& output, int o, bool tangents);
+    };
+}
+
+#endif /* Spine_PathConstraint_h */

+ 105 - 0
spine-cpp/spine-cpp/include/spine/PathConstraintData.h

@@ -0,0 +1,105 @@
+/******************************************************************************
+ * 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_PathConstraintData_h
+#define Spine_PathConstraintData_h
+
+#include <spine/PositionMode.h>
+#include <spine/SpacingMode.h>
+#include <spine/RotateMode.h>
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class BoneData;
+    class SlotData;
+    
+    class PathConstraintData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        friend class PathConstraint;
+        friend class Skeleton;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        
+    public:
+        PathConstraintData(std::string name);
+        
+        const std::string& getName();
+        
+        int getOrder();
+        void setOrder(int inValue);
+        
+        Vector<BoneData*>& getBones();
+        
+        SlotData* getTarget();
+        void setTarget(SlotData* inValue);
+        
+        PositionMode getPositionMode();
+        void setPositionMode(PositionMode inValue);
+        
+        SpacingMode getSpacingMode();
+        void setSpacingMode(SpacingMode inValue);
+        
+        RotateMode getRotateMode();
+        void setRotateMode(RotateMode inValue);
+        
+        float getOffsetRotation();
+        void setOffsetRotation(float inValue);
+        
+        float getPosition();
+        void setPosition(float inValue);
+        
+        float getSpacing();
+        void setSpacing(float inValue);
+        
+        float getRotateMix();
+        void setRotateMix(float inValue);
+        
+        float getTranslateMix();
+        void setTranslateMix(float inValue);
+        
+    private:
+        const std::string _name;
+        int _order;
+        Vector<BoneData*> _bones;
+        SlotData* _target;
+        PositionMode _positionMode;
+        SpacingMode _spacingMode;
+        RotateMode _rotateMode;
+        float _offsetRotation;
+        float _position, _spacing, _rotateMix, _translateMix;
+    };
+}
+
+#endif /* Spine_PathConstraintData_h */

+ 64 - 0
spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h

@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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_PathConstraintMixTimeline_h
+#define Spine_PathConstraintMixTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class PathConstraintMixTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        static const int ENTRIES;
+        
+        PathConstraintMixTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+    private:
+        static const int PREV_TIME, PREV_ROTATE, PREV_TRANSLATE;
+        static const int ROTATE, TRANSLATE;
+        
+        Vector<float> _frames;
+        int _pathConstraintIndex;
+        
+        /// Sets the time and mixes of the specified keyframe.
+        void setFrame(int frameIndex, float time, float rotateMix, float translateMix);
+    };
+}
+
+#endif /* Spine_PathConstraintMixTimeline_h */

+ 64 - 0
spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h

@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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_PathConstraintPositionTimeline_h
+#define Spine_PathConstraintPositionTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class PathConstraintPositionTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        static const int ENTRIES;
+        
+        PathConstraintPositionTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, float time, float value);
+        
+    protected:
+        static const int PREV_TIME, PREV_VALUE;
+        static const int VALUE;
+        
+        Vector<float> _frames;
+        int _pathConstraintIndex;
+    };
+}
+
+#endif /* Spine_PathConstraintPositionTimeline_h */

+ 52 - 0
spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h

@@ -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_PathConstraintSpacingTimeline_h
+#define Spine_PathConstraintSpacingTimeline_h
+
+#include <spine/PathConstraintPositionTimeline.h>
+
+namespace Spine {
+    class PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        PathConstraintSpacingTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+    };
+}
+
+#endif /* Spine_PathConstraintSpacingTimeline_h */

+ 73 - 0
spine-cpp/spine-cpp/include/spine/PointAttachment.h

@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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_PointAttachment_h
+#define Spine_PointAttachment_h
+
+#include <spine/Attachment.h>
+
+namespace Spine {
+    class Bone;
+    
+    /// 
+    /// An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
+    /// used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
+    /// skin.
+    ///
+    /// See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide.
+    /// 
+    class PointAttachment : public Attachment {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        PointAttachment(std::string name);
+        
+        void computeWorldPosition(Bone& bone, float& ox, float& oy);
+        
+        float computeWorldRotation(Bone& bone);
+        
+        float getX();
+        void setX(float inValue);
+        
+        float getY();
+        void setY(float inValue);
+        
+        float getRotation();
+        void setRotation(float inValue);
+        
+    private:
+        float _x, _y, _rotation;
+    };
+}
+
+#endif /* Spine_PointAttachment_h */

+ 77 - 0
spine-cpp/spine-cpp/include/spine/Pool.h

@@ -0,0 +1,77 @@
+/******************************************************************************
+ * 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_Pool_h
+#define Spine_Pool_h
+
+#include <spine/Extension.h>
+#include <spine/Vector.h>
+#include <spine/ContainerUtil.h>
+
+namespace Spine {
+    template <typename T>
+    class Pool {
+    public:
+        Pool() {
+            // Empty
+        }
+        
+        ~Pool() {
+            ContainerUtil::cleanUpVectorOfPointers(_objects);
+        }
+        
+        T* obtain() {
+            if (_objects.size() > 0) {
+                T** object = _objects.begin();
+                T* ret = *object;
+                _objects.erase(0);
+                
+                return ret;
+            }
+            else {
+                T* ret = NEW(T);
+                new (ret) T();
+                
+                return ret;
+            }
+        }
+        
+        void free(T* object) {
+            if (!_objects.contains(object)) {
+                _objects.push_back(object);
+            }
+        }
+        
+    private:
+        Vector<T*> _objects;
+    };
+}
+
+#endif /* Spine_Pool_h */

+ 41 - 0
spine-cpp/spine-cpp/include/spine/PositionMode.h

@@ -0,0 +1,41 @@
+/******************************************************************************
+ * 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_PositionMode_h
+#define Spine_PositionMode_h
+
+namespace Spine {
+    enum PositionMode {
+        PositionMode_Fixed = 0,
+        PositionMode_Percent
+    };
+}
+
+#endif /* Spine_PositionMode_h */

+ 73 - 0
spine-cpp/spine-cpp/include/spine/RTTI.h

@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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_RTTI_h
+#define Spine_RTTI_h
+
+#include <string>
+
+namespace Spine {
+    class RTTI {
+    public:
+        RTTI(const std::string& className);
+        
+        RTTI(const std::string& className, const RTTI& baseRTTI);
+        
+        const std::string& getClassName() const;
+        
+        bool isExactly(const RTTI& rtti) const;
+        
+        bool derivesFrom(const RTTI& rtti) const;
+        
+    private:
+        // Prevent copying
+        RTTI(const RTTI& obj);
+        RTTI& operator=(const RTTI& obj);
+        
+        const std::string m_className;
+        const RTTI *m_pBaseRTTI;
+    };
+}
+
+#define RTTI_DECL \
+public: \
+static const Spine::RTTI rtti; \
+virtual const Spine::RTTI& getRTTI();
+
+#define RTTI_IMPL_NOPARENT(name) \
+const Spine::RTTI name::rtti(#name); \
+const Spine::RTTI& name::getRTTI() { return rtti; }
+
+#define RTTI_IMPL(name,parent) \
+const Spine::RTTI name::rtti(#name, parent::rtti); \
+const Spine::RTTI& name::getRTTI() { return rtti; }
+
+#endif /* Spine_RTTI_h */
+

+ 141 - 0
spine-cpp/spine-cpp/include/spine/RegionAttachment.h

@@ -0,0 +1,141 @@
+/******************************************************************************
+ * 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_RegionAttachment_h
+#define Spine_RegionAttachment_h
+
+#include <spine/Attachment.h>
+
+#include <spine/Vector.h>
+
+#include <string>
+
+#define NUM_UVS 8
+
+namespace Spine {
+    class Bone;
+    
+    /// Attachment that displays a texture region.
+    class RegionAttachment : public Attachment {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class AtlasAttachmentLoader;
+        
+        RTTI_DECL;
+        
+    public:
+        RegionAttachment(std::string name);
+
+        void updateOffset();
+        
+        void setUVs(float u, float v, float u2, float v2, bool rotate);
+        
+        /// Transforms the attachment's four vertices to world coordinates.
+        /// @param bone The parent bone.
+        /// @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 stride The number of worldVertices entries between the value pairs written.
+        void computeWorldVertices(Bone& bone, Vector<float>& worldVertices, int offset, int stride = 2);
+        
+        float getX();
+        void setX(float inValue);
+        float getY();
+        void setY(float inValue);
+        float getRotation();
+        void setRotation(float inValue);
+        float getScaleX();
+        void setScaleX(float inValue);
+        float getScaleY();
+        void setScaleY(float inValue);
+        float getWidth();
+        void setWidth(float inValue);
+        float getHeight();
+        void setHeight(float inValue);
+        
+        float getR();
+        void setR(float inValue);
+        float getG();
+        void setG(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getA();
+        void setA(float inValue);
+        
+        std::string getPath();
+        void setPath(std::string inValue);
+        void* getRendererObject();
+        void setRendererObject(void* inValue);
+        float getRegionOffsetX();
+        void setRegionOffsetX(float inValue);
+        
+        // Pixels stripped from the bottom left, unrotated.
+        float getRegionOffsetY();
+        void setRegionOffsetY(float inValue);
+        float getRegionWidth();
+        void setRegionWidth(float inValue);
+        
+        // Unrotated, stripped size.
+        float getRegionHeight();
+        void setRegionHeight(float inValue);
+        float getRegionOriginalWidth();
+        void setRegionOriginalWidth(float inValue);
+        
+        // Unrotated, unstripped size.
+        float getRegionOriginalHeight();
+        void setRegionOriginalHeight(float inValue);
+        
+        Vector<float>& getOffset();
+        Vector<float>& getUVs();
+        
+    private:
+        static const int BLX;
+        static const int BLY;
+        static const int ULX;
+        static const int ULY;
+        static const int URX;
+        static const int URY;
+        static const int BRX;
+        static const int BRY;
+        
+        float _x, _y, _rotation, _scaleX, _scaleY, _width, _height;
+        float _regionOffsetX, _regionOffsetY, _regionWidth, _regionHeight, _regionOriginalWidth, _regionOriginalHeight;
+        Vector<float> _offset;
+        Vector<float> _uvs;
+        void* _rendererObject;
+        std::string _path;
+        float _regionU;
+        float _regionV;
+        float _regionU2;
+        float _regionV2;
+        float _r, _g, _b, _a;
+    };
+}
+
+#endif /* Spine_RegionAttachment_h */

+ 42 - 0
spine-cpp/spine-cpp/include/spine/RotateMode.h

@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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_RotateMode_h
+#define Spine_RotateMode_h
+
+namespace Spine {
+    enum RotateMode {
+        RotateMode_Tangent = 0,
+        RotateMode_Chain,
+        RotateMode_ChainScale
+    };
+}
+
+#endif /* Spine_RotateMode_h */

+ 72 - 0
spine-cpp/spine-cpp/include/spine/RotateTimeline.h

@@ -0,0 +1,72 @@
+/******************************************************************************
+ * 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_RotateTimeline_h
+#define Spine_RotateTimeline_h
+
+#include <spine/CurveTimeline.h>
+
+namespace Spine {
+    class RotateTimeline : public CurveTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class AnimationState;
+        
+        RTTI_DECL;
+        
+    public:
+        static const int ENTRIES = 2;
+        
+        RotateTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+        
+        /// Sets the time and value of the specified keyframe.
+        void setFrame(int frameIndex, float time, float degrees);
+        
+        int getBoneIndex();
+        void setBoneIndex(int inValue);
+        
+        Vector<float>& getFrames();
+        void setFrames(Vector<float> inValue);
+        
+    private:
+        static const int PREV_TIME = -2;
+        static const int PREV_ROTATION = -1;
+        static const int ROTATION = 1;
+        
+        int _boneIndex;
+        Vector<float> _frames; // time, angle, ...
+    };
+}
+
+#endif /* Spine_RotateTimeline_h */

+ 52 - 0
spine-cpp/spine-cpp/include/spine/ScaleTimeline.h

@@ -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_ScaleTimeline_h
+#define Spine_ScaleTimeline_h
+
+#include <spine/TranslateTimeline.h>
+
+namespace Spine {
+    class ScaleTimeline : public TranslateTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        ScaleTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+    };
+}
+
+#endif /* Spine_ScaleTimeline_h */

+ 52 - 0
spine-cpp/spine-cpp/include/spine/ShearTimeline.h

@@ -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_ShearTimeline_h
+#define Spine_ShearTimeline_h
+
+#include <spine/TranslateTimeline.h>
+
+namespace Spine {
+    class ShearTimeline : public TranslateTimeline {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        RTTI_DECL;
+        
+    public:
+        ShearTimeline(int frameCount);
+        
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction);
+        
+        virtual int getPropertyId();
+    };
+}
+
+#endif /* Spine_ShearTimeline_h */

+ 207 - 0
spine-cpp/spine-cpp/include/spine/Skeleton.h

@@ -0,0 +1,207 @@
+/******************************************************************************
+ * 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_Skeleton_h
+#define Spine_Skeleton_h
+
+#include <spine/Vector.h>
+#include <spine/MathUtil.h>
+
+#include <string>
+#include <limits> // std::numeric_limits
+
+namespace Spine {
+    class SkeletonData;
+    class Bone;
+    class Updatable;
+    class Slot;
+    class IkConstraint;
+    class PathConstraint;
+    class TransformConstraint;
+    class Skin;
+    class Attachment;
+    
+    class Skeleton {
+        friend class AnimationState;
+        friend class SkeletonBounds;
+        friend class SkeletonClipping;
+        
+        friend class AttachmentTimeline;
+        friend class ColorTimeline;
+        friend class DeformTimeline;
+        friend class DrawOrderTimeline;
+        friend class EventTimeline;
+        friend class IkConstraintTimeline;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TransformConstraintTimeline;
+        friend class TranslateTimeline;
+        friend class TwoColorTimeline;
+        
+    public:
+        Skeleton(SkeletonData& skeletonData);
+        
+        ~Skeleton();
+        
+        /// Caches information about bones and constraints. Must be called if bones, constraints or weighted path attachments are added
+        /// or removed.
+        void updateCache();
+        
+        /// Updates the world transform for each bone and applies constraints.
+        void updateWorldTransform();
+        
+        /// Sets the bones, constraints, and slots to their setup pose values.
+        void setToSetupPose();
+        
+        /// Sets the bones and constraints to their setup pose values.
+        void setBonesToSetupPose();
+        
+        void setSlotsToSetupPose();
+        
+        /// @return May be NULL.
+        Bone* findBone(std::string boneName);
+        
+        /// @return -1 if the bone was not found.
+        int findBoneIndex(std::string boneName);
+        
+        /// @return May be NULL.
+        Slot* findSlot(std::string slotName);
+        
+        /// @return -1 if the bone was not found.
+        int findSlotIndex(std::string slotName);
+        
+        /// Sets a skin by name (see setSkin).
+        void setSkin(std::string skinName);
+        
+        /// Attachments from the new skin are attached if the corresponding attachment from the old skin was attached.
+        /// If there was no old skin, each slot's setup mode attachment is attached from the new skin.
+        /// After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling
+        /// See Skeleton::setSlotsToSetupPose()
+        /// Also, often AnimationState::apply(Skeleton&) is called before the next time the
+        /// skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin.
+        ///
+        /// @param newSkin May be NULL.
+        void setSkin(Skin* newSkin);
+        
+        /// @return May be NULL.
+        Attachment* getAttachment(std::string slotName, std::string attachmentName);
+        
+        /// @return May be NULL.
+        Attachment* getAttachment(int slotIndex, std::string attachmentName);
+        
+        /// @param attachmentName May be empty.
+        void setAttachment(std::string slotName, std::string attachmentName);
+        
+        /// @return May be NULL.
+        IkConstraint* findIkConstraint(std::string constraintName);
+        
+        /// @return May be NULL.
+        TransformConstraint* findTransformConstraint(std::string constraintName);
+        
+        /// @return May be NULL.
+        PathConstraint* findPathConstraint(std::string constraintName);
+        
+        void update(float delta);
+        
+        /// Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose.
+        /// @param outX The horizontal distance between the skeleton origin and the left side of the AABB.
+        /// @param outY The vertical distance between the skeleton origin and the bottom side of the AABB.
+        /// @param outWidth The width of the AABB
+        /// @param outHeight The height of the AABB.
+        /// @param outVertexBuffer Reference to hold a Vector of floats. This method will assign it with new floats as needed.
+        void getBounds(float& outX, float& outY, float& outWidth, float& outHeight, Vector<float>& outVertexBuffer);
+        
+        Bone* getRootBone();
+        
+        const SkeletonData& getData();
+        Vector<Bone*>& getBones();
+        Vector<Updatable*>& getUpdateCacheList();
+        Vector<Slot*>& getSlots();
+        Vector<Slot*>& getDrawOrder();
+        Vector<IkConstraint*>& getIkConstraints();
+        Vector<PathConstraint*>& getPathConstraints();
+        Vector<TransformConstraint*>& getTransformConstraints();
+        
+        Skin* getSkin();
+        float getR();
+        void setR(float inValue);
+        float getG();
+        void setG(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getA();
+        void setA(float inValue);
+        float getTime();
+        void setTime(float inValue);
+        float getX();
+        void setX(float inValue);
+        float getY();
+        void setY(float inValue);
+        bool getFlipX();
+        void setFlipX(float inValue);
+        bool getFlipY();
+        void setFlipY(float inValue);
+        
+    private:
+        SkeletonData& _data;
+        Vector<Bone*> _bones;
+        Vector<Slot*> _slots;
+        Vector<Slot*> _drawOrder;
+        Vector<IkConstraint*> _ikConstraints;
+        Vector<TransformConstraint*> _transformConstraints;
+        Vector<PathConstraint*> _pathConstraints;
+        Vector<Updatable*> _updateCache;
+        Vector<Bone*> _updateCacheReset;
+        Skin* _skin;
+        float _r, _g, _b, _a;
+        float _time;
+        bool _flipX, _flipY;
+        float _x, _y;
+        
+        void sortIkConstraint(IkConstraint* constraint);
+        
+        void sortPathConstraint(PathConstraint* constraint);
+        
+        void sortTransformConstraint(TransformConstraint* constraint);
+        
+        void sortPathConstraintAttachment(Skin* skin, int slotIndex, Bone& slotBone);
+        
+        void sortPathConstraintAttachment(Attachment* attachment, Bone& slotBone);
+        
+        void sortBone(Bone* bone);
+        
+        static void sortReset(Vector<Bone*>& bones);
+    };
+}
+
+#endif /* Spine_Skeleton_h */

+ 127 - 0
spine-cpp/spine-cpp/include/spine/SkeletonBinary.h

@@ -0,0 +1,127 @@
+/******************************************************************************
+ * 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_SkeletonBinary_h
+#define Spine_SkeletonBinary_h
+
+#include <spine/TransformMode.h>
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class SkeletonData;
+    class Atlas;
+    class AttachmentLoader;
+    class LinkedMesh;
+    class Skin;
+    class Attachment;
+    class VertexAttachment;
+    class Animation;
+    class CurveTimeline;
+    
+    class SkeletonBinary {
+    public:
+        static const int BONE_ROTATE;
+        static const int BONE_TRANSLATE;
+        static const int BONE_SCALE;
+        static const int BONE_SHEAR;
+        
+        static const int SLOT_ATTACHMENT;
+        static const int SLOT_COLOR;
+        static const int SLOT_TWO_COLOR;
+        
+        static const int PATH_POSITION;
+        static const int PATH_SPACING;
+        static const int PATH_MIX;
+        
+        static const int CURVE_LINEAR;
+        static const int CURVE_STEPPED;
+        static const int CURVE_BEZIER;
+        
+        static const TransformMode TRANSFORM_MODE_VALUES[5];
+        
+        SkeletonBinary(Vector<Atlas*>& atlasArray);
+        
+        SkeletonBinary(AttachmentLoader* attachmentLoader);
+        
+        ~SkeletonBinary();
+        
+        SkeletonData* readSkeletonData(const unsigned char* binary, const int length);
+        
+        SkeletonData* readSkeletonDataFile(const char* path);
+        
+    private:
+        struct DataInput {
+            const unsigned char* cursor;
+            const unsigned char* end;
+        };
+        
+        AttachmentLoader* _attachmentLoader;
+        Vector<LinkedMesh*> _linkedMeshes;
+        std::string _error;
+        float _scale;
+        const bool _ownsLoader;
+        
+        void setError(const char* value1, const char* value2);
+        
+        char* readString(DataInput* input);
+        
+        float readFloat(DataInput* input);
+        
+        unsigned char readByte(DataInput* input);
+        
+        signed char readSByte(DataInput* input);
+        
+        int readBoolean(DataInput* input);
+        
+        int readInt(DataInput* input);
+        
+        void readColor(DataInput* input, float *r, float *g, float *b, float *a);
+        
+        int readVarint(DataInput* input, bool optimizePositive);
+        
+        Skin* readSkin(DataInput* input, const char* skinName, SkeletonData* skeletonData, bool nonessential);
+        
+        Attachment* readAttachment(DataInput* input, Skin* skin, int slotIndex, const char* attachmentName, SkeletonData* skeletonData, bool nonessential);
+        
+        void readVertices(DataInput* input, VertexAttachment* attachment, int vertexCount);
+        
+        Vector<float> readFloatArray(DataInput *input, int n, float scale);
+        
+        Vector<short> readShortArray(DataInput *input);
+        
+        Animation* readAnimation(const char* name, DataInput* input, SkeletonData *skeletonData);
+        
+        void readCurve(DataInput* input, int frameIndex, CurveTimeline* timeline);
+    };
+}
+
+#endif /* Spine_SkeletonBinary_h */

+ 108 - 0
spine-cpp/spine-cpp/include/spine/SkeletonBounds.h

@@ -0,0 +1,108 @@
+/******************************************************************************
+ * 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_SkeletonBounds_h
+#define Spine_SkeletonBounds_h
+
+#include <spine/Vector.h>
+
+namespace Spine {
+    class Skeleton;
+    class BoundingBoxAttachment;
+    
+    class 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.
+    ///
+    class SkeletonBounds {
+    public:
+        SkeletonBounds();
+        
+        ///
+        /// Clears any previous polygons, finds all visible bounding box attachments,
+        /// and computes the world vertices for each bounding box's polygon.
+        /// @param skeleton The skeleton.
+        /// @param updateAabb
+        /// If true, the axis aligned bounding box containing all the polygons is computed.
+        /// If false, the SkeletonBounds AABB methods will always return true.
+        ///
+        void update(Skeleton& skeleton, bool updateAabb);
+        
+        /// Returns true if the axis aligned bounding box contains the point.
+        bool aabbcontainsPoint(float x, float y);
+        
+        /// Returns true if the axis aligned bounding box intersects the line segment.
+        bool aabbintersectsSegment(float x1, float y1, float x2, float y2);
+        
+        /// Returns true if the axis aligned bounding box intersects the axis aligned bounding box of the specified bounds.
+        bool aabbIntersectsSkeleton(SkeletonBounds bounds);
+        
+        /// Returns true if the polygon contains the point.
+        bool containsPoint(Polygon* polygon, float x, float y);
+        
+        /// Returns the first bounding box attachment that contains the point, or NULL. When doing many checks, it is usually more
+        /// efficient to only call this method if {@link #aabbcontainsPoint(float, float)} returns true.
+        BoundingBoxAttachment* containsPoint(float x, float y);
+        
+        /// Returns the first bounding box attachment that contains the line segment, or NULL. When doing many checks, it is usually
+        /// more efficient to only call this method if {@link #aabbintersectsSegment(float, float, float, float)} returns true.
+        BoundingBoxAttachment* intersectsSegment(float x1, float y1, float x2, float y2);
+        
+        /// Returns true if the polygon contains the line segment.
+        bool intersectsSegment(Polygon* polygon, float x1, float y1, float x2, float y2);
+        
+        Polygon* getPolygon(BoundingBoxAttachment* attachment);
+
+        float getWidth();
+        float getHeight();
+        
+    private:
+        Vector<Polygon*> _polygonPool;
+        Vector<BoundingBoxAttachment*> _boundingBoxes;
+        Vector<Polygon*> _polygons;
+        float _minX, _minY, _maxX, _maxY;
+        
+        void aabbCompute();
+    };
+    
+    class Polygon {
+    public:
+        Vector<float> _vertices;
+        int _count;
+        
+        Polygon() : _count(0) {
+            _vertices.reserve(16);
+        }
+    };
+}
+
+#endif /* Spine_SkeletonBounds_h */

+ 78 - 0
spine-cpp/spine-cpp/include/spine/SkeletonClipping.h

@@ -0,0 +1,78 @@
+/******************************************************************************
+ * 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_SkeletonClipping_h
+#define Spine_SkeletonClipping_h
+
+#include <spine/Vector.h>
+#include <spine/Triangulator.h>
+
+namespace Spine {
+    class Slot;
+    class ClippingAttachment;
+    
+    class SkeletonClipping {
+    public:
+        SkeletonClipping();
+        
+        int clipStart(Slot& slot, ClippingAttachment* clip);
+        
+        void clipEnd(Slot& slot);
+        
+        void clipEnd();
+        
+        void clipTriangles(Vector<float>& vertices, int verticesLength, Vector<int>& triangles, int trianglesLength, Vector<float>& uvs);
+        
+        bool isClipping();
+        
+        Vector<float>& getClippedVertices();
+        Vector<int>& getClippedTriangles();
+        Vector<float>& getClippedUVs();
+        
+    private:
+        Triangulator _triangulator;
+        Vector<float> _clippingPolygon;
+        Vector<float> _clipOutput;
+        Vector<float> _clippedVertices;
+        Vector<int> _clippedTriangles;
+        Vector<float> _clippedUVs;
+        Vector<float> _scratch;
+        ClippingAttachment* _clipAttachment;
+        Vector< Vector<float>* > _clippingPolygons;
+        
+        /** Clips the input triangle against the convex, clockwise clipping area. If the triangle lies entirely within the clipping
+                  * area, false is returned. The clipping area must duplicate the first vertex at the end of the vertices list. */
+        bool clip(float x1, float y1, float x2, float y2, float x3, float y3, Vector<float>& clippingArea, Vector<float>& output);
+        
+        static void makeClockwise(Vector<float>& polygon);
+    };
+}
+
+#endif /* Spine_SkeletonClipping_h */

+ 162 - 0
spine-cpp/spine-cpp/include/spine/SkeletonData.h

@@ -0,0 +1,162 @@
+/******************************************************************************
+ * 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_SkeletonData_h
+#define Spine_SkeletonData_h
+
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class BoneData;
+    class SlotData;
+    class Skin;
+    class EventData;
+    class Animation;
+    class IkConstraintData;
+    class TransformConstraintData;
+    class PathConstraintData;
+    
+    /// Stores the setup pose and all of the stateless data for a skeleton.
+    class SkeletonData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        friend class Skeleton;
+        
+    public:
+        SkeletonData();
+        
+        ~SkeletonData();
+        
+        /// Finds a bone by comparing each bone's name.
+        /// It is more efficient to cache the results of this method than to call it multiple times.
+        /// @return May be NULL.
+        BoneData* findBone(std::string boneName);
+        
+        /// @return -1 if the bone was not found.
+        int findBoneIndex(std::string boneName);
+        
+        /// @return May be NULL.
+        SlotData* findSlot(std::string slotName);
+        
+        /// @return -1 if the slot was not found.
+        int findSlotIndex(std::string slotName);
+        
+        /// @return May be NULL.
+        Skin* findSkin(std::string skinName);
+        
+        /// @return May be NULL.
+        EventData* findEvent(std::string eventDataName);
+        
+        /// @return May be NULL.
+        Animation* findAnimation(std::string animationName);
+        
+        /// @return May be NULL.
+        IkConstraintData* findIkConstraint(std::string constraintName);
+        
+        /// @return May be NULL.
+        TransformConstraintData* findTransformConstraint(std::string constraintName);
+        
+        /// @return May be NULL.
+        PathConstraintData* findPathConstraint(std::string constraintName);
+        
+        /// @return -1 if the path constraint was not found.
+        int findPathConstraintIndex(std::string pathConstraintName);
+        
+        std::string getName();
+        void setName(std::string inValue);
+        
+        /// The skeleton's bones, sorted parent first. The root bone is always the first bone.
+        Vector<BoneData*>& getBones();
+        
+        Vector<SlotData*>& getSlots();
+        
+        /// All skins, including the default skin.
+        Vector<Skin*>& getSkins();
+        void setSkins(Vector<Skin*>& inValue);
+        
+        /// The skeleton's default skin.
+        /// By default this skin contains all attachments that were not in a skin in Spine.
+        ///
+        /// @return May be NULL.
+        Skin* getDefaultSkin();
+        void setDefaultSkin(Skin* inValue);
+        
+        Vector<EventData*>& getEvents();
+        void setEvents(Vector<EventData*>& inValue);
+        Vector<Animation*>& getAnimations();
+        void setAnimations(Vector<Animation*>& inValue);
+        Vector<IkConstraintData*>& getIkConstraints();
+        void setIkConstraints(Vector<IkConstraintData*>& inValue);
+        Vector<TransformConstraintData*>& getTransformConstraints();
+        void setTransformConstraints(Vector<TransformConstraintData*>& inValue);
+        Vector<PathConstraintData*>& getPathConstraints();
+        void setPathConstraints(Vector<PathConstraintData*>& inValue);
+        
+        float getWidth();
+        void setWidth(float inValue);
+        float getHeight();
+        void setHeight(float inValue);
+        
+        /// The Spine version used to export this data, or NULL.
+        std::string getVersion();
+        void setVersion(std::string inValue);
+        std::string getHash();
+        void setHash(std::string inValue);
+        std::string getImagesPath();
+        void setImagesPath(std::string inValue);
+        
+        /// The dopesheet FPS in Spine. Available only when nonessential data was exported.
+        float getFps();
+        void setFps(float inValue);
+        
+    private:
+        std::string _name;
+        Vector<BoneData*> _bones; // Ordered parents first
+        Vector<SlotData*> _slots; // Setup pose draw order.
+        Vector<Skin*> _skins;
+        Skin* _defaultSkin;
+        Vector<EventData*> _events;
+        Vector<Animation*> _animations;
+        Vector<IkConstraintData*> _ikConstraints;
+        Vector<TransformConstraintData*> _transformConstraints;
+        Vector<PathConstraintData*> _pathConstraints;
+        float _width, _height;
+        std::string _version;
+        std::string _hash;
+        
+        // Nonessential.
+        float _fps;
+        std::string _imagesPath;
+    };
+}
+
+#endif /* Spine_SkeletonData_h */

+ 79 - 0
spine-cpp/spine-cpp/include/spine/SkeletonJson.h

@@ -0,0 +1,79 @@
+/******************************************************************************
+ * 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_SkeletonJson_h
+#define Spine_SkeletonJson_h
+
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class CurveTimeline;
+    class VertexAttachment;
+    class Animation;
+    class Json;
+    class SkeletonData;
+    class Atlas;
+    class AttachmentLoader;
+    class LinkedMesh;
+    
+    class SkeletonJson {
+    public:
+        SkeletonJson(Vector<Atlas*>& atlasArray);
+        
+        SkeletonJson(AttachmentLoader* attachmentLoader);
+        
+        ~SkeletonJson();
+        
+        SkeletonData* readSkeletonDataFile(const char* path);
+        
+        SkeletonData* readSkeletonData(const char* json);
+        
+    private:
+        AttachmentLoader* _attachmentLoader;
+        Vector<LinkedMesh*> _linkedMeshes;
+        float _scale;
+        const bool _ownsLoader;
+        std::string _error;
+        
+        static float toColor(const char* value, int index);
+        
+        static void readCurve(Json* frame, CurveTimeline* timeline, int frameIndex);
+        
+        Animation* readAnimation(Json* root, SkeletonData *skeletonData);
+        
+        void readVertices(Json* attachmentMap, VertexAttachment* attachment, int verticesLength);
+        
+        void setError(Json* root, const char* value1, const char* value2);
+    };
+}
+
+#endif /* Spine_SkeletonJson_h */

+ 94 - 0
spine-cpp/spine-cpp/include/spine/Skin.h

@@ -0,0 +1,94 @@
+/******************************************************************************
+ * 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_Skin_h
+#define Spine_Skin_h
+
+#include <string>
+#include <spine/HashMap.h>
+#include <spine/Vector.h>
+
+namespace Spine {
+    class Attachment;
+    class Skeleton;
+    
+    /// Stores attachments by slot index and attachment name.
+    /// See SkeletonData::getDefaultSkin, Skeleton::getSkin, and
+    /// http://esotericsoftware.com/spine-runtime-skins in the Spine Runtimes Guide.
+    class Skin {
+        friend class Skeleton;
+        
+    public:
+        class AttachmentKey {
+        public:
+            int _slotIndex;
+            std::string _name;
+            
+            AttachmentKey(int slotIndex = 0, std::string name = "");
+            
+            bool operator==(const AttachmentKey &other) const;
+        };
+        
+        struct HashAttachmentKey {
+            std::size_t operator()(const Spine::Skin::AttachmentKey& val) const;
+        };
+        
+        Skin(std::string name);
+        
+        /// Adds an attachment to the skin for the specified slot index and name.
+        /// If the name already exists for the slot, the previous value is replaced.
+        void addAttachment(int slotIndex, std::string name, Attachment* attachment);
+        
+        /// Returns the attachment for the specified slot index and name, or NULL.
+        Attachment* getAttachment(int slotIndex, std::string name);
+        
+        /// Finds the skin keys for a given slot. The results are added to the passed array of names.
+        /// @param slotIndex The target slotIndex. To find the slot index, use Skeleton::findSlotIndex or SkeletonData::findSlotIndex
+        /// @param names Found skin key names will be added to this array.
+        void findNamesForSlot(int slotIndex, Vector<std::string>& names);
+        
+        /// Finds the attachments for a given slot. The results are added to the passed array of Attachments.
+        /// @param slotIndex The target slotIndex. To find the slot index, use Skeleton::findSlotIndex or SkeletonData::findSlotIndex
+        /// @param attachments Found Attachments will be added to this array.
+        void findAttachmentsForSlot(int slotIndex, Vector<Attachment*>& attachments);
+        
+        const std::string& getName();
+        HashMap<AttachmentKey, Attachment*, HashAttachmentKey>& getAttachments();
+        
+    private:
+        const std::string _name;
+        HashMap<AttachmentKey, Attachment*, HashAttachmentKey> _attachments;
+        
+        /// Attach all attachments from this skin if the corresponding attachment from the old skin is currently attached.
+        void attachAll(Skeleton& skeleton, Skin& oldSkin);
+    };
+}
+
+#endif /* Spine_Skin_h */

+ 115 - 0
spine-cpp/spine-cpp/include/spine/Slot.h

@@ -0,0 +1,115 @@
+/******************************************************************************
+ * 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_Slot_h
+#define Spine_Slot_h
+
+#include <spine/Vector.h>
+
+#include <string>
+
+namespace Spine {
+    class SlotData;
+    class Bone;
+    class Skeleton;
+    class Attachment;
+    
+    class Slot {
+        friend class VertexAttachment;
+        friend class Skeleton;
+        friend class SkeletonBounds;
+        friend class SkeletonClipping;
+        
+        friend class AttachmentTimeline;
+        friend class ColorTimeline;
+        friend class DeformTimeline;
+        friend class DrawOrderTimeline;
+        friend class EventTimeline;
+        friend class IkConstraintTimeline;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TransformConstraintTimeline;
+        friend class TranslateTimeline;
+        friend class TwoColorTimeline;
+        
+    public:
+        Slot(SlotData& data, Bone& bone);
+        
+        void setToSetupPose();
+        
+        SlotData& getData();
+        Bone& getBone();
+        Skeleton& getSkeleton();
+        
+        float getR();
+        void setR(float inValue);
+        float getG();
+        void setG(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getA();
+        void setA(float inValue);
+        
+        float getR2();
+        void setR2(float inValue);
+        float getG2();
+        void setG2(float inValue);
+        float getB2();
+        void setB2(float inValue);
+        bool hasSecondColor();
+        void setHasSecondColor(bool inValue);
+        
+        /// May be NULL.
+        Attachment* getAttachment();
+        void setAttachment(Attachment* inValue);
+        
+        float getAttachmentTime();
+        void setAttachmentTime(float inValue);
+        
+        Vector<float>& getAttachmentVertices();
+        void setAttachmentVertices(Vector<float> inValue);
+        
+    private:
+        SlotData& _data;
+        Bone& _bone;
+        Skeleton& _skeleton;
+        float _r, _g, _b, _a;
+        float _r2, _g2, _b2;
+        bool _hasSecondColor;
+        Attachment* _attachment;
+        float _attachmentTime;
+        Vector<float> _attachmentVertices;
+    };
+}
+
+#endif /* Spine_Slot_h */

+ 106 - 0
spine-cpp/spine-cpp/include/spine/SlotData.h

@@ -0,0 +1,106 @@
+/******************************************************************************
+ * 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_SlotData_h
+#define Spine_SlotData_h
+
+#include <spine/BlendMode.h>
+
+#include <string>
+
+namespace Spine {
+    class BoneData;
+    
+    class SlotData {
+        friend class SkeletonBinary;
+        friend class SkeletonJson;
+        
+        friend class AttachmentTimeline;
+        friend class ColorTimeline;
+        friend class DeformTimeline;
+        friend class DrawOrderTimeline;
+        friend class EventTimeline;
+        friend class IkConstraintTimeline;
+        friend class PathConstraintMixTimeline;
+        friend class PathConstraintPositionTimeline;
+        friend class PathConstraintSpacingTimeline;
+        friend class ScaleTimeline;
+        friend class ShearTimeline;
+        friend class TransformConstraintTimeline;
+        friend class TranslateTimeline;
+        friend class TwoColorTimeline;
+        
+    public:
+        SlotData(int index, std::string name, BoneData& boneData);
+        
+        const int getIndex();
+        
+        const std::string& getName();
+        
+        BoneData& getBoneData();
+        
+        float getR();
+        void setR(float inValue);
+        float getG();
+        void setG(float inValue);
+        float getB();
+        void setB(float inValue);
+        float getA();
+        void setA(float inValue);
+        
+        float getR2();
+        void setR2(float inValue);
+        float getG2();
+        void setG2(float inValue);
+        float getB2();
+        void setB2(float inValue);
+        bool hasSecondColor();
+        void setHasSecondColor(bool inValue);
+        
+        /// May be empty.
+        std::string getAttachmentName();
+        void setAttachmentName(std::string inValue);
+        
+        BlendMode getBlendMode();
+        void setBlendMode(BlendMode inValue);
+        
+    private:
+        const int _index;
+        const std::string _name;
+        BoneData& _boneData;
+        float _r, _g, _b, _a;
+        float _r2, _g2, _b2, _a2;
+        bool _hasSecondColor;
+        std::string _attachmentName;
+        BlendMode _blendMode;
+    };
+}
+
+#endif /* Spine_SlotData_h */

+ 42 - 0
spine-cpp/spine-cpp/include/spine/SpacingMode.h

@@ -0,0 +1,42 @@
+/******************************************************************************
+ * 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_SpacingMode_h
+#define Spine_SpacingMode_h
+
+namespace Spine {
+    enum SpacingMode {
+        SpacingMode_Length = 0,
+        SpacingMode_Fixed,
+        SpacingMode_Percent
+    };
+}
+
+#endif /* Spine_SpacingMode_h */

+ 51 - 0
spine-cpp/spine-cpp/include/spine/TextureLoader.h

@@ -0,0 +1,51 @@
+/******************************************************************************
+ * 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_TextureLoader_h
+#define Spine_TextureLoader_h
+
+#include <string>
+
+namespace Spine {
+    class AtlasPage;
+    
+    class TextureLoader {
+    public:
+        TextureLoader();
+        
+        virtual ~TextureLoader();
+        
+        virtual void load(AtlasPage& page, std::string path) = 0;
+        
+        virtual void unload(void* texture) = 0;
+    };
+}
+
+#endif /* Spine_TextureLoader_h */

+ 68 - 0
spine-cpp/spine-cpp/include/spine/Timeline.h

@@ -0,0 +1,68 @@
+/******************************************************************************
+ * 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_Timeline_h
+#define Spine_Timeline_h
+
+#include <spine/RTTI.h>
+#include <spine/Vector.h>
+#include <spine/MixPose.h>
+#include <spine/MixDirection.h>
+
+namespace Spine {
+    class Skeleton;
+    class Event;
+    
+    class Timeline {
+        RTTI_DECL;
+        
+    public:
+        Timeline();
+        
+        virtual ~Timeline();
+        
+        /// Sets the value(s) for the specified time.
+        /// @param skeleton The skeleton the timeline is being applied to. This provides access to the bones, slots, and other skeleton components the timeline may change.
+        /// @param lastTime lastTime The time this timeline was last applied. Timelines such as EventTimeline trigger only at specific times rather than every frame. In that case, the timeline triggers everything between lastTime (exclusive) and time (inclusive).
+        /// @param time The time within the animation. Most timelines find the key before and the key after this time so they can interpolate between the keys.
+        /// @param pEvents If any events are fired, they are added to this array. Can be NULL to ignore firing events or if the timeline does not fire events. May be NULL.
+        /// @param alpha alpha 0 applies the current or setup pose value (depending on pose parameter). 1 applies the timeline
+        ///     value. Between 0 and 1 applies a value between the current or setup pose and the timeline value. By adjusting
+        ///     alpha over time, an animation can be mixed in or out. alpha can also be useful to
+        ///      apply animations on top of each other (layered).
+        /// @param pose Controls how mixing is applied when alpha is than 1.
+        /// @param direction Indicates whether the timeline is mixing in or out. Used by timelines which perform instant transitions such as DrawOrderTimeline and AttachmentTimeline.
+        virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector<Event*>* pEvents, float alpha, MixPose pose, MixDirection direction) = 0;
+        
+        virtual int getPropertyId() = 0;
+    };
+}
+
+#endif /* Spine_Timeline_h */

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov