Bläddra i källkod

Merge branch '3.8' into 3.9-beta

badlogic 5 år sedan
förälder
incheckning
ebe44b0e13
100 ändrade filer med 7065 tillägg och 397 borttagningar
  1. 27 0
      examples/export/runtimes.sh
  2. 56 12
      spine-cocos2dx/CMakeLists.txt
  3. 61 11
      spine-cocos2dx/README.md
  4. 4 0
      spine-cocos2dx/example-v4/.cocos-project.json
  5. 169 0
      spine-cocos2dx/example-v4/CMakeLists.txt
  6. BIN
      spine-cocos2dx/example-v4/Resources/common/coin-pro.skel
  7. 55 0
      spine-cocos2dx/example-v4/Resources/common/coin.atlas
  8. BIN
      spine-cocos2dx/example-v4/Resources/common/coin.png
  9. 1117 0
      spine-cocos2dx/example-v4/Resources/common/goblins-pro.json
  10. 293 0
      spine-cocos2dx/example-v4/Resources/common/goblins.atlas
  11. BIN
      spine-cocos2dx/example-v4/Resources/common/goblins.png
  12. BIN
      spine-cocos2dx/example-v4/Resources/common/mix-and-match-pro.skel
  13. 1042 0
      spine-cocos2dx/example-v4/Resources/common/mix-and-match.atlas
  14. BIN
      spine-cocos2dx/example-v4/Resources/common/mix-and-match.png
  15. 687 0
      spine-cocos2dx/example-v4/Resources/common/raptor-pro.json
  16. 272 0
      spine-cocos2dx/example-v4/Resources/common/raptor.atlas
  17. BIN
      spine-cocos2dx/example-v4/Resources/common/raptor.png
  18. 478 0
      spine-cocos2dx/example-v4/Resources/common/spineboy-pro.json
  19. 286 0
      spine-cocos2dx/example-v4/Resources/common/spineboy.atlas
  20. BIN
      spine-cocos2dx/example-v4/Resources/common/spineboy.png
  21. BIN
      spine-cocos2dx/example-v4/Resources/common/tank-pro.skel
  22. 174 0
      spine-cocos2dx/example-v4/Resources/common/tank.atlas
  23. BIN
      spine-cocos2dx/example-v4/Resources/common/tank.png
  24. 8 0
      spine-cocos2dx/example-v4/proj.android/.gitignore
  25. 2 0
      spine-cocos2dx/example-v4/proj.android/app/.gitignore
  26. 35 0
      spine-cocos2dx/example-v4/proj.android/app/AndroidManifest.xml
  27. 97 0
      spine-cocos2dx/example-v4/proj.android/app/build.gradle
  28. 42 0
      spine-cocos2dx/example-v4/proj.android/app/jni/hellocpp/main.cpp
  29. 37 0
      spine-cocos2dx/example-v4/proj.android/app/proguard-rules.pro
  30. BIN
      spine-cocos2dx/example-v4/proj.android/app/res/mipmap-hdpi/ic_launcher.png
  31. BIN
      spine-cocos2dx/example-v4/proj.android/app/res/mipmap-mdpi/ic_launcher.png
  32. BIN
      spine-cocos2dx/example-v4/proj.android/app/res/mipmap-xhdpi/ic_launcher.png
  33. BIN
      spine-cocos2dx/example-v4/proj.android/app/res/mipmap-xxhdpi/ic_launcher.png
  34. 3 0
      spine-cocos2dx/example-v4/proj.android/app/res/values/strings.xml
  35. 58 0
      spine-cocos2dx/example-v4/proj.android/app/src/org/cocos2dx/cpp/AppActivity.java
  36. 26 0
      spine-cocos2dx/example-v4/proj.android/build.gradle
  37. 42 0
      spine-cocos2dx/example-v4/proj.android/gradle.properties
  38. BIN
      spine-cocos2dx/example-v4/proj.android/gradle/wrapper/gradle-wrapper.jar
  39. 6 0
      spine-cocos2dx/example-v4/proj.android/gradle/wrapper/gradle-wrapper.properties
  40. 164 0
      spine-cocos2dx/example-v4/proj.android/gradlew
  41. 90 0
      spine-cocos2dx/example-v4/proj.android/gradlew.bat
  42. 4 0
      spine-cocos2dx/example-v4/proj.android/settings.gradle
  43. 38 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/AppController.h
  44. 153 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/AppController.mm
  45. 157 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json
  46. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png
  47. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  48. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  49. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png
  50. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  51. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  52. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png
  53. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  54. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  55. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png
  56. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  57. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png
  58. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  59. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  60. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  61. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png
  62. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  63. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png
  64. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  65. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]
  66. 6 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/Contents.json
  67. 45 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Info.plist
  68. 45 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/LaunchScreen.storyboard
  69. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/ios/LaunchScreenBackground.png
  70. 12 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/Prefix.pch
  71. 35 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/RootViewController.h
  72. 122 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/RootViewController.mm
  73. 15 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/exportoptions.plist
  74. 7 0
      spine-cocos2dx/example-v4/proj.ios_mac/ios/main.m
  75. BIN
      spine-cocos2dx/example-v4/proj.ios_mac/mac/Icon.icns
  76. 36 0
      spine-cocos2dx/example-v4/proj.ios_mac/mac/Info.plist
  77. 11 0
      spine-cocos2dx/example-v4/proj.ios_mac/mac/Prefix.pch
  78. 35 0
      spine-cocos2dx/example-v4/proj.ios_mac/mac/main.cpp
  79. 39 0
      spine-cocos2dx/example-v4/proj.linux/main.cpp
  80. 8 0
      spine-cocos2dx/example-v4/proj.win32/build-cfg.json
  81. 86 0
      spine-cocos2dx/example-v4/proj.win32/game.rc
  82. 42 0
      spine-cocos2dx/example-v4/proj.win32/main.cpp
  83. 37 0
      spine-cocos2dx/example-v4/proj.win32/main.h
  84. BIN
      spine-cocos2dx/example-v4/proj.win32/res/game.ico
  85. 44 0
      spine-cocos2dx/example-v4/proj.win32/resource.h
  86. 3 1
      spine-cocos2dx/example/.gitignore
  87. 102 73
      spine-cocos2dx/example/CMakeLists.txt
  88. 0 1
      spine-cocos2dx/example/Classes/AppDelegate.cpp
  89. 1 1
      spine-cocos2dx/example/proj.ios_mac/ios/Info.plist
  90. 52 30
      spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj
  91. 1 1
      spine-cocos2dx/src/spine/SkeletonAnimation.h
  92. 91 30
      spine-cocos2dx/src/spine/SkeletonRenderer.cpp
  93. 2 1
      spine-cocos2dx/src/spine/SkeletonRenderer.h
  94. 49 5
      spine-cocos2dx/src/spine/spine-cocos2dx.cpp
  95. 18 3
      spine-cocos2dx/src/spine/spine-cocos2dx.h
  96. 156 151
      spine-cocos2dx/src/spine/v3/SkeletonBatch.cpp
  97. 79 75
      spine-cocos2dx/src/spine/v3/SkeletonBatch.h
  98. 5 1
      spine-cocos2dx/src/spine/v3/SkeletonTwoColorBatch.cpp
  99. 5 1
      spine-cocos2dx/src/spine/v3/SkeletonTwoColorBatch.h
  100. 193 0
      spine-cocos2dx/src/spine/v4/SkeletonBatch.cpp

+ 27 - 0
examples/export/runtimes.sh

@@ -99,6 +99,33 @@ cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-cocos2dx/examp
 cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-cocos2dx/example/Resources/common/"
 cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-cocos2dx/example/Resources/common/"
 
+rm "$ROOT/spine-cocos2dx/example-v4/Resources/common/"*
+
+cp -f ../coin/export/coin-pro.skel "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../coin/export/coin.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../coin/export/coin.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+cp -f ../goblins/export/goblins-pro.json "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../goblins/export/goblins.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../goblins/export/goblins.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+cp -f ../raptor/export/raptor-pro.json "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../raptor/export/raptor.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../raptor/export/raptor.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+cp -f ../spineboy/export/spineboy-pro.json "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../spineboy/export/spineboy.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../spineboy/export/spineboy.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+cp -f ../tank/export/tank-pro.skel "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../tank/export/tank.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../tank/export/tank.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+cp -f ../mix-and-match/export/mix-and-match-pro.skel "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../mix-and-match/export/mix-and-match.atlas "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+cp -f ../mix-and-match/export/mix-and-match.png "$ROOT/spine-cocos2dx/example-v4/Resources/common/"
+
+
 echo "spine-corona"
 rm "$ROOT/spine-corona/data/"*
 cp -f ../coin/export/coin-pro.json "$ROOT/spine-corona/data"

+ 56 - 12
spine-cocos2dx/CMakeLists.txt

@@ -1,17 +1,61 @@
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 3.6)
+
+project(spine-cocos2dx-example)
+
 set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example")
+option(USE_COCOS2DX_V4 "Use cocos2d-x version 4.0+" OFF)
+
+if(USE_COCOS2DX_V4)
+	set(COCOS_FOLDER_NAME "cocos2d-x-4.0")
+	set(COCOS_DOWNLOAD_URL "https://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip")
+	set(COCOS_SHORT_VERSION "v4")
+	set(EXAMPLE_DIR "${CMAKE_CURRENT_LIST_DIR}/example-v4")
+else()
+	set(COCOS_FOLDER_NAME "cocos2d-x-3.17.2")
+	set(COCOS_DOWNLOAD_URL "http://download.cocos.com/Cocos2D-X/${COCOS_FOLDER_NAME}.zip")
+	set(COCOS_SHORT_VERSION "v3")
+endif()
+
+if((NOT ${COCOS_CURRENT_VERSION} STREQUAL ${COCOS_SHORT_VERSION}) AND (NOT ${COCOS_CURRENT_VERSION} STREQUAL ""))
+	message(STATUS "Target Cocos2d-x version ${COCOS_SHORT_VERSION}, current ${COCOS_CURRENT_VERSION}")
+	message(STATUS "remove current folder ${EXAMPLE_DIR}/cocos2d")
+	file(REMOVE_RECURSE ${EXAMPLE_DIR}/cocos2d ${EXAMPLE_DIR}/cocos2dx.zip)
+endif()
+
 if (NOT EXISTS ${EXAMPLE_DIR}/cocos2d)
-	message("Downloading cocos2dx, this may take some time!")
-	file(DOWNLOAD "https://digitalocean.cocos2d-x.org/Cocos2D-X/cocos2d-x-3.17.2.zip" "${EXAMPLE_DIR}/cocos2dx.zip")
+
+	if(NOT EXISTS ${EXAMPLE_DIR}/cocos2dx.zip)
+		message(STATUS "Downloading cocos2dx ${COCOS_SHORT_VERSION}, this may take some time!")
+		# download cocos2d-x package
+		file(DOWNLOAD ${COCOS_DOWNLOAD_URL} "${EXAMPLE_DIR}/cocos2dx.zip" SHOW_PROGRESS)
+	else()
+		message(STATUS "${EXAMPLE_DIR}/cocos2dx.zip found!")
+	endif()
+
+
+	# untar
+	message(STATUS "untar ${EXAMPLE_DIR}/cocos2dx.zip ...")
 	execute_process(
-		COMMAND ${CMAKE_COMMAND} -E tar x  ${EXAMPLE_DIR}/cocos2dx.zip
+		COMMAND ${CMAKE_COMMAND} -E tar x ${EXAMPLE_DIR}/cocos2dx.zip
 		WORKING_DIRECTORY ${EXAMPLE_DIR}
-    )
-    execute_process(
-    	COMMAND ${CMAKE_COMMAND} -E rename
-        "${EXAMPLE_DIR}/cocos2d-x-3.17.2" "${EXAMPLE_DIR}/cocos2d"
-    )
-    execute_process(
-    	COMMAND ${CMAKE_COMMAND} -E remove_directory "${EXAMPLE_DIR}/cocos2d/cocos/editor-support/spine"
-    )
+	)
+	# rename folder
+	execute_process(
+		COMMAND ${CMAKE_COMMAND} -E rename
+		"${EXAMPLE_DIR}/${COCOS_FOLDER_NAME}" "${EXAMPLE_DIR}/cocos2d"
+	)
+
+	set(COCOS_CURRENT_VERSION ${COCOS_SHORT_VERSION} CACHE STRING "update current version" FORCE)
+
+	# remove spine source code in cocos2d-x's source tree
+	execute_process(
+		COMMAND ${CMAKE_COMMAND} -E remove_directory "${EXAMPLE_DIR}/cocos2d/cocos/editor-support/spine"
+		COMMAND ${CMAKE_COMMAND} -E make_directory "${EXAMPLE_DIR}/cocos2d/cocos/editor-support/spine"
+	)
+else()
+	message(STATUS "${EXAMPLE_DIR}/cocos2d is already exists, current version ${COCOS_SHORT_VERSION}.")
+endif()
+
+if(USE_COCOS2DX_V4)
+	add_subdirectory("${EXAMPLE_DIR}")
 endif()

+ 61 - 11
spine-cocos2dx/README.md

@@ -1,4 +1,4 @@
-# spine-cocos2dx v3.x
+# spine-cocos2dx v3.x & v4.x
 
 The spine-cocos2dx runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [cocos2d-x](http://www.cocos2d-x.org/). spine-cocos2dx is based on [spine-cpp](../spine-cpp).
 
@@ -22,17 +22,27 @@ spine-cocos2dx supports all Spine features.
 
 The setup for cocos2d-x differs from most other Spine Runtimes because the cocos2d-x distribution includes a copy of the Spine Runtime files. This is not ideal because these files may be old and fail to work with the latest Spine editor. Also it means if cocos2d-x is updated, you may get newer Spine Runtime files which can break your application if you are not using the latest Spine editor. For these reasons, we have requested cocos2d-x to cease distributing the Spine Runtime files, but they  continue to do so. The following instructions allow you to use the official Spine cocos2d-x runtime with your cocos2d-x project.
 
-1. Create a new cocos2d-x project. See [the cocos2d-x documentation](http://www.cocos2d-x.org/docs/static-pages/installation.html)
+### Cocos2d-x v3.x
+1. Create a new cocos2d-x project. See [the cocos2d-x documentation](https://docs.cocos2d-x.org/cocos2d-x/v3/en/installation/)
 2. Delete the folder `cocos2d/cocos/editor-support/spine`. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
 3. Open your project in your IDE of choice, then open the cocos2d_libs sub project and delete the `editor-support/spine` group. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x from your build.
 3. Download the Spine Runtimes source using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
 4. Add the sources from `spine-cpp/spine-cpp/src/spine` and `spine-cocos2dx/src/spine` to your project
 4. Add the folders `spine-cpp/spine-cpp/include` and `spine-cocos2dx/src` to your header search path. Note that includes are specified as `#inclue <spine/file.h>`, so the `spine` directory cannot be omitted when copying the source files.
 
+### Cocos2d-x v4.x
+TBD
+
+1. Create a new Cocos2D-x project. See [the cocos2d-x documentation](https://docs.cocos2d-x.org/cocos2d-x/v4/en/installation/)
+2. Delete the folder `cocos2d/cocos/editor-support/spine` in your project. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
+3. TBD Integration in `CMakeLists.txt`
+
 ## Example
 The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android.
 
-### Windows
+### Cocos2d-x v3.x
+
+#### Windows
 1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
 2. Install CMake via the [Windows installer package](https://cmake.org/download/).
 3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
@@ -47,7 +57,7 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android.
 9. Right click the `spine-cocos2d-x` project in the solution explorer and select `Set as Startup Project` from the context menu
 10. Click `Local Windows Debugger` to run the example
 
-### macOS/iOS
+#### macOS/iOS
 1. Install [Xcode](https://developer.apple.com/xcode/)
 2. Install [Homebrew](http://brew.sh/)
 3. Open a terminal and install CMake via `brew install cmake`
@@ -58,7 +68,7 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android.
 7. Expand the `cocos2d_libs.xcodeproj` sub project, delete the group `editor-support/spine`. This will remove the outdated Spine cocos2d-x runtime shipped by cocos2d-x.
 8. Click the `Run` button or type `CMD+R` to run the example
 
-### Android
+#### Android (on macOS)
 1. Install the prerequisits for [cocos2d-x Android development](http://www.cocos2d-x.org/docs/installation/Android-terminal/)
 2. Install [Homebrew](http://brew.sh/)
 3. Open a terminal and install CMake via `brew install cmake`
@@ -71,13 +81,53 @@ The Spine cocos2d-x example works on Windows, Mac OS X, iOS and Android.
 9. In the same directory, execute `cocos run -p android -m debug` to deploy to the device
 10. For debugging, run `ndk-debug` in the `proj.android/jni` folder. This will attach to the running app via GDB.
 
+### Cocos2d-x v4.x
+
+#### Windows
+1. Install [Visual Studio 2019 Community](https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
+2. Install CMake via the [Windows installer package](https://cmake.org/download/).
+3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
+4. Run CMake GUI from the start menu
+5. Click `Browse Source` and select the directory `spine-runtimes`
+6. Click `Browse Build` and select the `spine-runtimes/spine-cocos2dx/build` directory. You can create the `build` folder directly in the file dialog via `New Folder`.
+7. Click `Configure`. Check `SPINE_COCOS2D_X`
+8. Click `Configure` again. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
+7. Open the file `spine-cocos2dx\example\cocos2d\cocos\2d\cocos2dx.props` and remove the `libSpine.lib` entry from the `<AdditionalDependencies>` tag.
+8. Open the `spine-runtimes/spine-cocos2dx/example/proj.win32/spine-cocos2d-x.sln` file in Visual Studio 2019. Visual Studio may ask you to install the Windows XP/7 SDK, which you should install.
+9. Expand `References` of the libcocos2d sub project, and remove the entry for `libSpine`, which should be marked with an error.
+9. Right click the `spine-cocos2d-x` project in the solution explorer and select `Set as Startup Project` from the context menu
+10. Click `Local Windows Debugger` to run the example
+
+#### macOS
+1. Install [Xcode](https://developer.apple.com/xcode/)
+2. Install [Homebrew](http://brew.sh/)
+3. Open a terminal and install CMake via `brew install cmake`
+3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
+4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
+5. Type `mkdir build-v4 && cd build-v4 && cmake -GXcode -DUSE_COCOS2DX_V4=on ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
+6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/build-v4`
+7. Make sure you select `spine-cocos2dx-example > My Mac` as the target and click the `Run` button or type `CMD+R` to run the example.
+
+#### iOS
+1. Install [Xcode](https://developer.apple.com/xcode/)
+2. Install [Homebrew](http://brew.sh/)
+3. Open a terminal and install CMake via `brew install cmake`
+3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
+4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
+5. Type `mkdir build-v4 && cd build-v4 && cmake -GXcode -DUSE_COCOS2DX_V4=on -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
+6. Open the Xcode project in `spine-runtimes/spine-cocos2dx/build-v4`
+7. Make sure you select `spine-cocos2dx-example > Device` as the target, where `Device` is either a simulator or a physically connected device. Click the `Run` button or type `CMD+R` to run the example.
+
+#### Android (on macOS)
+1. Install the prerequisits for [cocos2d-x Android development](http://www.cocos2d-x.org/docs/installation/Android-terminal/)
+2. Install [Homebrew](http://brew.sh/)
+3. Open a terminal and install CMake via `brew install cmake`
+3. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above.
+4. Open a terminal, and `cd` into the `spine-runtimes/spine-cocos2dx` folder
+5. Type `mkdir build-v4 && cd build-v4 && cmake -DUSE_COCOS2DX_V4=on ..`. This will download the cocos2d-x dependency and wire it up with the example source code in `spine-runtimes/spine-cocos2dx/example`. The download is 400mb, so get yourself a cup of tea.
+6. Execute `cocos run -s . -p android`, this will build, deploy and run the APK on a connected device.
+
 ## Notes
 
 * Images are premultiplied by cocos2d-x, so the Spine atlas images should *not* use premultiplied alpha.
 * Two color tinting needs to be enabled on a per-skeleton basis. Call `SkeletonRenderer::setTwoColorTine(true)` or `SkeletonAnimation::setTwoColorTint(true)` after you created the skeleton instance. Note that two color tinting requires a custom shader and vertex format. Skeletons rendered with two color tinting can therefore not be batched with single color tinted skeletons or other 2D cocos2d-x elements like sprites. However, two-color tinted skeletons will be batched if possible when rendered after one another. Attaching a child to a two color tinted skeleton will also break the batch.
-
-## Examples
-
-- [Raptor](example/Classes/RaptorExample.cpp)
-- [Spineboy](example/Classes/SpineboyExample.cpp)
-- [Golbins](example/Classes/GoblinsExample.cpp)

+ 4 - 0
spine-cocos2dx/example-v4/.cocos-project.json

@@ -0,0 +1,4 @@
+{
+    "engine_version": "cocos2d-x-4.0", 
+    "project_type": "cpp"
+}

+ 169 - 0
spine-cocos2dx/example-v4/CMakeLists.txt

@@ -0,0 +1,169 @@
+#/****************************************************************************
+# Copyright (c) 2013-2014 cocos2d-x.org
+# Copyright (c) 2015-2017 Chukong Technologies Inc.
+#
+# http://www.cocos2d-x.org
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+# ****************************************************************************/
+
+cmake_minimum_required(VERSION 3.6)
+
+set(APP_NAME spine-cocos2dx-example)
+
+project(${APP_NAME})
+
+if(XCODE)
+    if(NOT DEFINED CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET)
+        SET (CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET 8.0)
+    endif()
+endif()
+
+if(NOT DEFINED BUILD_ENGINE_DONE) # to test spine-cocos2dx-example into root project
+    set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cocos2d)
+    set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
+
+    include(CocosBuildSet)
+    add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
+endif()
+
+
+# Add spine-cpp library
+file(GLOB SPINE_CPP_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/**/*.h")
+file(GLOB SPINE_CPP_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/src/**/*.cpp")
+add_library(spine-cpp STATIC ${SPINE_CPP_SOURCE} ${SPINE_CPP_HEADER})
+target_include_directories(spine-cpp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/")
+
+# Add spine-cocos2dx library
+file(GLOB_RECURSE SPINE_COCOS2DX_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../src/**/*.h")
+file(GLOB_RECURSE SPINE_COCOS2DX_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../src/**/*.cpp")
+add_library(spine-cocos2dx STATIC ${SPINE_COCOS2DX_SOURCE} ${SPINE_COCOS2DX_HEADER})
+target_include_directories(spine-cocos2dx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../spine-cpp/spine-cpp/include/")
+target_include_directories(spine-cocos2dx PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../src/")
+target_link_libraries(spine-cocos2dx PRIVATE cocos2d)
+
+# record sources, headers, resources...
+set(GAME_RES_FOLDER
+    "${CMAKE_CURRENT_SOURCE_DIR}/../example/Resources"
+    )
+if(APPLE OR WINDOWS)
+    cocos_mark_multi_resources(common_res_files RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
+endif()
+
+# add cross-platforms source files and header files
+file(GLOB_RECURSE GAME_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes/*.cpp")
+file(GLOB_RECURSE GAME_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes/*.h")
+set(GAME_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../example/Classes")
+
+if(ANDROID)
+    # change APP_NAME to the share library name for Android, it's value depend on AndroidManifest.xml
+    set(APP_NAME MyGame)
+    list(APPEND GAME_SOURCE
+         proj.android/app/jni/hellocpp/main.cpp
+         )
+elseif(LINUX)
+    list(APPEND GAME_SOURCE
+         proj.linux/main.cpp
+         )
+elseif(WINDOWS)
+    list(APPEND GAME_HEADER
+         proj.win32/main.h
+         proj.win32/resource.h
+         )
+    list(APPEND GAME_SOURCE
+         proj.win32/main.cpp
+         proj.win32/game.rc
+         ${common_res_files}
+         )
+elseif(APPLE)
+    if(IOS)
+        list(APPEND GAME_HEADER
+             proj.ios_mac/ios/AppController.h
+             proj.ios_mac/ios/RootViewController.h
+             )
+        set(APP_UI_RES
+            proj.ios_mac/ios/LaunchScreen.storyboard
+            proj.ios_mac/ios/LaunchScreenBackground.png
+            proj.ios_mac/ios/Images.xcassets
+            )
+        list(APPEND GAME_SOURCE
+             proj.ios_mac/ios/main.m
+             proj.ios_mac/ios/AppController.mm
+             proj.ios_mac/ios/RootViewController.mm
+             proj.ios_mac/ios/Prefix.pch
+             ${APP_UI_RES}
+             )
+    elseif(MACOSX)
+        set(APP_UI_RES
+            proj.ios_mac/mac/Icon.icns
+            proj.ios_mac/mac/Info.plist
+            )
+        list(APPEND GAME_SOURCE
+             proj.ios_mac/mac/main.cpp
+             proj.ios_mac/mac/Prefix.pch
+             ${APP_UI_RES}
+             )
+    endif()
+    list(APPEND GAME_SOURCE ${common_res_files})
+endif()
+
+# mark app complie info and libs info
+set(all_code_files
+    ${GAME_HEADER}
+    ${GAME_SOURCE}
+    )
+if(NOT ANDROID)
+    add_executable(${APP_NAME} ${all_code_files})
+	target_link_libraries(${APP_NAME} spine-cpp spine-cocos2dx)
+else()
+    add_library(${APP_NAME} SHARED ${all_code_files})
+    add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/platform)
+	target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
+    target_link_libraries(${APP_NAME} spine-cocos2dx)
+	target_link_libraries(${APP_NAME} spine-cpp)
+endif()
+
+target_link_libraries(${APP_NAME} cocos2d)
+target_include_directories(${APP_NAME}
+        PRIVATE ${GAME_INCLUDE}
+        PRIVATE ${COCOS2DX_ROOT_PATH}/cocos/audio/include/
+)
+
+# mark app resources
+setup_cocos_app_config(${APP_NAME})
+if(APPLE)
+    set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}")
+
+    if(MACOSX)
+        set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist")
+    elseif(IOS)
+        set_xcode_property(${APP_NAME} INFOPLIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
+        set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon")
+    endif()
+
+    # For code-signing, set the DEVELOPMENT_TEAM:
+    #set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9")
+elseif(WINDOWS)
+    cocos_copy_target_dll(${APP_NAME})
+endif()
+
+if(LINUX OR WINDOWS)
+    cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
+    cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
+endif()

BIN
spine-cocos2dx/example-v4/Resources/common/coin-pro.skel


+ 55 - 0
spine-cocos2dx/example-v4/Resources/common/coin.atlas

@@ -0,0 +1,55 @@
+
+coin.png
+size: 1024,1024
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+coin-front-logo
+  rotate: false
+  xy: 2, 609
+  size: 305, 302
+  orig: 305, 302
+  offset: 0, 0
+  index: -1
+coin-front-shine-logo
+  rotate: false
+  xy: 309, 629
+  size: 282, 282
+  orig: 282, 282
+  offset: 0, 0
+  index: -1
+coin-front-shine-spineboy
+  rotate: false
+  xy: 2, 21
+  size: 282, 282
+  orig: 282, 282
+  offset: 0, 0
+  index: -1
+coin-front-spineboy
+  rotate: false
+  xy: 2, 305
+  size: 305, 302
+  orig: 305, 302
+  offset: 0, 0
+  index: -1
+coin-side-round
+  rotate: false
+  xy: 309, 345
+  size: 144, 282
+  orig: 144, 282
+  offset: 0, 0
+  index: -1
+coin-side-straight
+  rotate: true
+  xy: 2, 2
+  size: 17, 282
+  orig: 17, 282
+  offset: 0, 0
+  index: -1
+shine
+  rotate: false
+  xy: 593, 666
+  size: 72, 245
+  orig: 72, 245
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/coin.png


+ 1117 - 0
spine-cocos2dx/example-v4/Resources/common/goblins-pro.json

@@ -0,0 +1,1117 @@
+{
+"skeleton": {
+	"hash": "1UfyPXuBeBo953f8bvof4WHo5GA",
+	"spine": "3.8.55",
+	"x": -134.12,
+	"y": -3.28,
+	"width": 266.94,
+	"height": 349.61,
+	"images": "./images/",
+	"audio": ""
+},
+"bones": [
+	{ "name": "root" },
+	{ "name": "hip", "parent": "root", "x": 0.65, "y": 114.41, "color": "ffcf00ff" },
+	{
+		"name": "torso",
+		"parent": "hip",
+		"length": 85.83,
+		"rotation": 93.93,
+		"x": -6.42,
+		"y": 1.98,
+		"color": "ffcf00ff"
+	},
+	{
+		"name": "neck",
+		"parent": "torso",
+		"length": 18.38,
+		"rotation": -1.52,
+		"x": 81.68,
+		"y": -6.35,
+		"color": "ffcf00ff"
+	},
+	{
+		"name": "head",
+		"parent": "neck",
+		"length": 68.29,
+		"rotation": -13.92,
+		"x": 20.94,
+		"y": 11.59,
+		"color": "ffcf00ff"
+	},
+	{
+		"name": "left-shoulder",
+		"parent": "torso",
+		"length": 35.43,
+		"rotation": -156.96,
+		"x": 74.05,
+		"y": -20.39,
+		"color": "ff0000ff"
+	},
+	{
+		"name": "left-arm",
+		"parent": "left-shoulder",
+		"length": 35.62,
+		"rotation": 28.17,
+		"x": 37.86,
+		"y": -2.35,
+		"color": "ff0000ff"
+	},
+	{
+		"name": "left-upper-leg",
+		"parent": "hip",
+		"length": 50.4,
+		"rotation": -89.1,
+		"x": 14.45,
+		"y": 2.81,
+		"color": "ff0000ff"
+	},
+	{
+		"name": "left-lower-leg",
+		"parent": "left-upper-leg",
+		"length": 49.9,
+		"rotation": -16.66,
+		"x": 56.34,
+		"y": 0.99,
+		"color": "ff0000ff"
+	},
+	{
+		"name": "left-foot",
+		"parent": "left-lower-leg",
+		"length": 46.5,
+		"rotation": 102.43,
+		"x": 58.94,
+		"y": -7.61,
+		"color": "ff0000ff"
+	},
+	{
+		"name": "left-hand",
+		"parent": "left-arm",
+		"length": 11.52,
+		"rotation": 2.7,
+		"x": 35.62,
+		"y": 0.08,
+		"color": "ff0000ff"
+	},
+	{ "name": "pelvis", "parent": "hip", "x": 1.41, "y": -6.58, "color": "ffcf00ff" },
+	{
+		"name": "right-shoulder",
+		"parent": "torso",
+		"length": 37.25,
+		"rotation": 133.89,
+		"x": 76.02,
+		"y": 18.15,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "right-arm",
+		"parent": "right-shoulder",
+		"length": 36.75,
+		"rotation": 36.33,
+		"x": 37.61,
+		"y": 0.31,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "right-upper-leg",
+		"parent": "hip",
+		"length": 42.46,
+		"rotation": -97.5,
+		"x": -20.08,
+		"y": -6.84,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "right-lower-leg",
+		"parent": "right-upper-leg",
+		"length": 58.53,
+		"rotation": -14.34,
+		"x": 43,
+		"y": -0.62,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "right-foot",
+		"parent": "right-lower-leg",
+		"length": 45.46,
+		"rotation": 110.31,
+		"x": 64.89,
+		"y": 0.04,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "right-hand",
+		"parent": "right-arm",
+		"length": 15.32,
+		"rotation": 2.36,
+		"x": 36.9,
+		"y": 0.35,
+		"color": "62ff00ff"
+	},
+	{
+		"name": "spear1",
+		"parent": "left-hand",
+		"length": 65.07,
+		"rotation": 102.43,
+		"x": 0.48,
+		"y": 17.03,
+		"color": "ffcf00ff"
+	},
+	{
+		"name": "spear2",
+		"parent": "spear1",
+		"length": 61.42,
+		"rotation": 0.9,
+		"x": 65.06,
+		"y": 0.04,
+		"color": "ffcf00ff"
+	},
+	{
+		"name": "spear3",
+		"parent": "spear2",
+		"length": 76.8,
+		"rotation": -0.9,
+		"x": 61.89,
+		"y": 0.57,
+		"color": "ffcf00ff"
+	}
+],
+"slots": [
+	{ "name": "left-shoulder", "bone": "left-shoulder", "attachment": "left-shoulder" },
+	{ "name": "left-arm", "bone": "left-arm", "attachment": "left-arm" },
+	{ "name": "left-hand-item", "bone": "left-hand", "attachment": "spear" },
+	{ "name": "left-hand", "bone": "left-hand", "attachment": "left-hand" },
+	{ "name": "left-foot", "bone": "left-foot", "attachment": "left-foot" },
+	{ "name": "left-lower-leg", "bone": "left-lower-leg", "attachment": "left-lower-leg" },
+	{ "name": "left-upper-leg", "bone": "left-upper-leg", "attachment": "left-upper-leg" },
+	{ "name": "neck", "bone": "neck", "attachment": "neck" },
+	{ "name": "torso", "bone": "torso", "attachment": "torso" },
+	{ "name": "pelvis", "bone": "pelvis", "attachment": "pelvis" },
+	{ "name": "right-foot", "bone": "right-foot", "attachment": "right-foot" },
+	{ "name": "right-lower-leg", "bone": "right-lower-leg", "attachment": "right-lower-leg" },
+	{ "name": "undie-straps", "bone": "pelvis", "attachment": "undie-straps" },
+	{ "name": "undies", "bone": "pelvis", "attachment": "undies" },
+	{ "name": "right-upper-leg", "bone": "right-upper-leg", "attachment": "right-upper-leg" },
+	{ "name": "head", "bone": "head", "attachment": "head" },
+	{ "name": "eyes", "bone": "head" },
+	{ "name": "right-shoulder", "bone": "right-shoulder", "attachment": "right-shoulder" },
+	{ "name": "right-arm", "bone": "right-arm", "attachment": "right-arm" },
+	{ "name": "right-hand-thumb", "bone": "right-hand", "attachment": "right-hand-thumb" },
+	{ "name": "right-hand-item", "bone": "right-hand", "attachment": "dagger" },
+	{ "name": "right-hand", "bone": "right-hand", "attachment": "right-hand" },
+	{ "name": "right-hand-item2", "bone": "right-hand", "attachment": "shield" }
+],
+"skins": [
+	{
+		"name": "default",
+		"attachments": {
+			"right-hand-item": {
+				"dagger": {
+					"type": "mesh",
+					"uvs": [ 0.78092, 0.38453, 1, 0.38406, 1, 0.44882, 0.73954, 0.4687, 0.74642, 0.81344, 0.34023, 1, 0.15434, 1, 0.11304, 0.78858, 0.23007, 0.47368, 0, 0.45047, 0, 0.38622, 0.22368, 0.38573, 0.24384, 0, 1, 0 ],
+					"triangles": [ 0, 12, 13, 11, 12, 0, 0, 1, 2, 9, 10, 11, 3, 11, 0, 3, 0, 2, 8, 11, 3, 9, 11, 8, 5, 6, 7, 4, 5, 8, 4, 8, 3, 5, 7, 8 ],
+					"vertices": [ 15.49, -12.83, 21.14, -13.57, 20.16, -20.5, 13.16, -21.68, 8.13, -58.57, -5.14, -77.04, -9.92, -76.37, -7.8, -53.61, -0.03, -20.36, -5.61, -17.04, -4.64, -10.17, 1.13, -10.93, 7.47, 30.24, 26.93, 27.5 ],
+					"hull": 14,
+					"edges": [ 22, 20, 24, 26, 22, 24, 2, 0, 0, 22, 0, 26, 12, 14, 14, 16, 18, 20, 16, 18, 2, 4, 4, 6, 6, 8, 10, 12, 8, 10 ],
+					"width": 26,
+					"height": 108
+				}
+			},
+			"left-hand-item": {
+				"dagger": { "x": 7.88, "y": -23.46, "rotation": 10.48, "width": 26, "height": 108 },
+				"spear": {
+					"type": "mesh",
+					"uvs": [ 1, 0.11236, 0.77096, 0.13278, 0.76608, 0.21781, 0.75642, 0.386, 0.74723, 0.54607, 0.72117, 1, 0.28838, 1, 0.24208, 0.54328, 0.2259, 0.38362, 0.20891, 0.21605, 0.20043, 0.13243, 0, 0.1152, 0.4527, 0, 0.58399, 0 ],
+					"triangles": [ 5, 6, 4, 6, 7, 4, 4, 7, 3, 2, 9, 1, 9, 10, 1, 10, 12, 1, 12, 13, 1, 1, 13, 0, 10, 11, 12, 3, 8, 2, 8, 9, 2, 7, 8, 3 ],
+					"vertices": [ 1, 20, 38.54, -10.89, 1, 1, 20, 30.97, -5.93, 1, 2, 19, 61.48, -5.59, 0.5116, 20, -0.31, -6.16, 0.4884, 2, 18, 64.73, -5.03, 0.50272, 19, -0.4, -5.07, 0.49728, 1, 10, 4.57, 23.91, 1, 1, 10, 41.7, -138.95, 1, 1, 10, 32.43, -141.1, 1, 1, 10, -6.49, 22.41, 1, 2, 18, 65.48, 6.65, 0.50272, 19, 0.53, 6.6, 0.49728, 2, 19, 62.19, 6.67, 0.5116, 20, 0.2, 6.1, 0.4884, 1, 20, 30.97, 6.62, 1, 1, 20, 37.26, 11.09, 1, 1, 20, 79.75, 1.6, 1, 1, 20, 79.78, -1.29, 1 ],
+					"hull": 14,
+					"edges": [ 24, 22, 22, 20, 10, 12, 2, 0, 24, 26, 0, 26, 8, 10, 12, 14, 6, 8, 14, 16, 2, 4, 4, 6, 16, 18, 18, 20, 20, 2 ],
+					"width": 22,
+					"height": 368
+				}
+			},
+			"right-hand-item2": {
+				"shield": { "rotation": 93.5, "width": 70, "height": 72 }
+			}
+		}
+	},
+	{
+		"name": "goblin",
+		"attachments": {
+			"right-hand": {
+				"right-hand": {
+					"name": "goblin/right-hand",
+					"type": "mesh",
+					"uvs": [ 0.17957, 0, 0, 0.44772, 0, 0.79734, 0.20057, 0.94264, 0.55057, 1, 0.8539, 1, 0.89824, 0.82005, 0.8259, 0.74286, 0.84224, 0.49994, 0.96357, 0.34102, 0.66024, 0 ],
+					"triangles": [ 8, 10, 9, 0, 10, 1, 8, 2, 1, 8, 1, 10, 7, 3, 8, 3, 2, 8, 4, 3, 7, 5, 7, 6, 4, 7, 5 ],
+					"vertices": [ -10.83, -9.45, 5.95, -15.35, 18.88, -14.9, 24.01, -7.5, 25.69, 5.16, 25.32, 16.08, 18.61, 17.44, 15.85, 14.74, 6.84, 15.02, 0.82, 19.19, -11.42, 7.84 ],
+					"hull": 11,
+					"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 0, 20 ],
+					"width": 36,
+					"height": 37
+				}
+			},
+			"right-hand-thumb": {
+				"right-hand-thumb": {
+					"name": "goblin/right-hand",
+					"type": "mesh",
+					"uvs": [ 0.88538, 0.22263, 0.76168, 0.3594, 0.75089, 0.78308, 0.95326, 0.84981, 1, 0.60303 ],
+					"triangles": [ 1, 0, 4, 2, 1, 4, 3, 2, 4 ],
+					"vertices": [ -2.82, 15.98, 2.4, 11.72, 18.08, 11.91, 20.28, 19.28, 11.09, 20.62 ],
+					"hull": 5,
+					"edges": [ 2, 4, 4, 6, 6, 8, 2, 0, 0, 8 ],
+					"width": 36,
+					"height": 37
+				}
+			},
+			"undies": {
+				"undies": {
+					"name": "goblin/undies",
+					"type": "mesh",
+					"uvs": [ 0, 0.3203, 0.14893, 0.59457, 0.22438, 1, 0.3591, 1, 0.50999, 1, 0.7956, 0.58454, 0.98421, 0.28016, 1, 0.00588, 0.46957, 0.17647, 0, 0.03933, 0.48843, 0.59123, 0.48115, 0.431 ],
+					"triangles": [ 6, 8, 7, 0, 9, 8, 11, 8, 6, 0, 8, 11, 5, 11, 6, 10, 11, 5, 1, 0, 11, 1, 11, 10, 3, 2, 1, 10, 3, 1, 4, 10, 5, 3, 10, 4 ],
+					"vertices": [ -13.22, 5.57, -8, -2.48, -5.49, -14.28, -0.64, -14.36, 4.79, -14.46, 15.28, -2.59, 22.22, 6.12, 22.93, 14.06, 3.75, 9.45, -13.08, 13.72, 4.22, -2.59, 4.04, 2.06 ],
+					"hull": 10,
+					"edges": [ 0, 2, 2, 4, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 4, 6, 6, 8, 6, 20, 16, 22, 22, 20, 0, 22, 22, 12, 2, 20, 20, 10 ],
+					"width": 36,
+					"height": 29
+				}
+			},
+			"right-lower-leg": {
+				"right-lower-leg": {
+					"name": "goblin/right-lower-leg",
+					"type": "mesh",
+					"uvs": [ 1, 0.27261, 0.81312, 0.52593, 0.79587, 0.71796, 0.95544, 0.80989, 0.85194, 0.95493, 0.47242, 1, 0.14034, 1, 0, 0.8773, 0.14896, 0.67914, 0.1619, 0.30326, 0.60611, 0 ],
+					"triangles": [ 1, 10, 0, 9, 10, 1, 8, 9, 1, 2, 8, 1, 4, 2, 3, 6, 7, 8, 5, 6, 8, 2, 5, 8, 4, 5, 2 ],
+					"vertices": [ 6.27, 8.46, 23.32, 8.05, 37.1, 12.9, 41.45, 20.83, 53.07, 21.47, 61.33, 10.06, 65.78, -1.04, 59, -9.19, 43.02, -9.82, 16.33, -20.01, -12.8, -9.26 ],
+					"hull": 11,
+					"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 20, 18, 20 ],
+					"width": 36,
+					"height": 76
+				}
+			},
+			"left-arm": {
+				"left-arm": {
+					"name": "goblin/left-arm",
+					"type": "mesh",
+					"uvs": [ 0.68993, 0.29284, 1, 0.46364, 1, 0.74644, 0.8409, 1, 0.66344, 1, 0.33766, 0.64284, 0, 0.44124, 0, 0, 0.34296, 0 ],
+					"triangles": [ 3, 4, 2, 4, 5, 2, 5, 0, 2, 0, 1, 2, 0, 5, 8, 5, 6, 8, 6, 7, 8 ],
+					"vertices": [ 18.6, 8.81, 32.2, 10.32, 38.02, 1.63, 38.08, -9.63, 32.32, -13.5, 14.37, -9.62, -0.76, -10.78, -9.85, 2.78, 1.29, 10.25 ],
+					"hull": 9,
+					"edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 6, 4, 6, 8, 8, 10, 12, 14, 10, 12 ],
+					"width": 37,
+					"height": 35
+				}
+			},
+			"undie-straps": {
+				"undie-straps": {
+					"name": "goblin/undie-straps",
+					"type": "mesh",
+					"uvs": [ 0.36098, 0.4496, 0.66298, 0.60591, 1, 0.19486, 1, 0.57118, 0.75898, 1, 0.38698, 1, 0, 0.26433, 0, 0, 0.12498, 0 ],
+					"triangles": [ 6, 7, 8, 6, 8, 0, 3, 1, 2, 5, 0, 1, 6, 0, 5, 4, 1, 3, 5, 1, 4 ],
+					"vertices": [ -10.56, 12.88, 6.54, 9.91, 25.62, 17.72, 25.62, 10.57, 11.97, 2.42, -9.09, 2.42, -31, 16.4, -31, 21.42, -23.93, 21.42 ],
+					"hull": 9,
+					"edges": [ 14, 16, 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 12, 14, 10, 12, 0, 10, 2, 8 ],
+					"width": 55,
+					"height": 19
+				}
+			},
+			"left-upper-leg": {
+				"left-upper-leg": {
+					"name": "goblin/left-upper-leg",
+					"type": "mesh",
+					"uvs": [ 1, 0.12168, 1, 0.54873, 0.91067, 0.78907, 0.76568, 1, 0.30871, 0.95791, 0, 0.68777, 0, 0.21901, 0.51962, 0, 0.87552, 0 ],
+					"triangles": [ 7, 8, 0, 5, 6, 7, 0, 1, 7, 4, 5, 7, 1, 4, 7, 2, 4, 1, 3, 4, 2 ],
+					"vertices": [ 2.34, 13.07, 33.51, 12.57, 51, 9.34, 66.32, 4.31, 63.01, -10.71, 43.13, -20.59, 8.91, -20.04, -6.8, -2.64, -6.61, 9.1 ],
+					"hull": 9,
+					"edges": [ 10, 8, 8, 6, 6, 4, 4, 2, 10, 12, 12, 14, 14, 16, 2, 0, 16, 0 ],
+					"width": 33,
+					"height": 73
+				}
+			},
+			"neck": {
+				"neck": {
+					"name": "goblin/neck",
+					"type": "mesh",
+					"uvs": [ 0.81968, 0.27365, 0.92101, 0.82048, 0.47135, 1, 0.15679, 0.93541, 0, 0.7556, 0.19268, 0.51834, 0.15468, 0.35707, 0, 0.2199, 0.13568, 0, 0.68879, 0, 0.70146, 0.53873 ],
+					"triangles": [ 3, 5, 2, 2, 10, 1, 2, 5, 10, 3, 4, 5, 10, 0, 1, 0, 10, 6, 10, 5, 6, 7, 8, 6, 6, 9, 0, 6, 8, 9 ],
+					"vertices": [ 18.63, -11.66, -3.98, -13.86, -10.29, 2.77, -6.92, 13.9, 0.8, 19.06, 10.06, 11.51, 16.75, 12.45, 22.72, 17.65, 31.4, 12.2, 30.12, -7.68, 8.05, -6.71 ],
+					"hull": 10,
+					"edges": [ 14, 12, 12, 10, 10, 8, 8, 6, 6, 4, 4, 2, 2, 20, 20, 0, 0, 18, 16, 18, 14, 16, 0, 2 ],
+					"width": 36,
+					"height": 41
+				}
+			},
+			"head": {
+				"head": {
+					"name": "goblin/head",
+					"type": "mesh",
+					"uvs": [ 0, 0.60495, 0.14172, 0.51451, 0.24218, 0.55229, 0.32668, 0.67807, 0.37969, 0.79352, 0.53505, 0.93015, 0.86057, 1, 0.94071, 0.94169, 0.92099, 0.69924, 0.9888, 0.65498, 0.99003, 0.51643, 0.89633, 0.43562, 0.94487, 0.41917, 1, 0.39713, 1, 0.2836, 0.94017, 0.27027, 0.87906, 0.25666, 0.80755, 0.16045, 0.66699, 0.01998, 0.4734, 0.01806, 0.29215, 0.19893, 0.25393, 0.31824, 0.09117, 0.32401, 0, 0.44331, 0.43271, 0.69154, 0.46601, 0.47795, 0.35997, 0.31246, 0.73474, 0.68594, 0.72216, 0.57426, 0.8818, 0.5583, 0.80268, 0.51016 ],
+					"triangles": [ 5, 27, 6, 7, 27, 8, 7, 6, 27, 4, 24, 5, 5, 24, 27, 4, 3, 24, 27, 29, 8, 8, 29, 9, 24, 28, 27, 24, 25, 28, 24, 3, 25, 29, 28, 30, 29, 27, 28, 25, 2, 26, 25, 3, 2, 9, 29, 10, 0, 23, 1, 28, 25, 30, 29, 11, 10, 29, 30, 11, 2, 21, 26, 2, 1, 21, 23, 22, 1, 1, 22, 21, 30, 16, 11, 30, 17, 16, 30, 25, 17, 17, 26, 18, 18, 26, 19, 26, 17, 25, 11, 15, 12, 11, 16, 15, 12, 15, 13, 15, 14, 13, 21, 20, 26, 26, 20, 19 ],
+					"vertices": [ 14.56, 50.42, 23.12, 35.48, 17.47, 26.36, 11.58, 16.87, 3.75, 11.71, -5.9, -3.92, -11.83, -37.24, -8.32, -45.64, 7.75, -44.24, 10.4, -51.34, 19.53, -51.83, 25.21, -43.16, 26.13, -47.43, 27.36, -53.16, 34.84, -53.46, 35.97, -47.34, 37.11, -41.09, 43.75, -33.98, 53.59, -19.88, 54.51, 0.04, 43.32, 19.17, 35.61, 23.41, 35.89, 40.18, 28.4, 49.87, 10.26, 5.99, 24.21, 2, 35.55, 12.48, 9.39, -25.11, 16.8, -24.31, 17.21, -40.66, 20.69, -33.02 ],
+					"hull": 24,
+					"edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 18, 20, 20, 22, 26, 28, 32, 34, 34, 36, 36, 38, 38, 40, 40, 42, 42, 44, 44, 46, 0, 46, 6, 48, 48, 50, 50, 52, 52, 42, 2, 4, 4, 6, 4, 52, 2, 44, 22, 32, 22, 24, 24, 26, 28, 30, 30, 32, 24, 30, 16, 54, 54, 56, 20, 58, 58, 54, 16, 58, 22, 60, 60, 56, 58, 60 ],
+					"width": 103,
+					"height": 66
+				}
+			},
+			"eyes": {
+				"eyes-closed": { "name": "goblin/eyes-closed", "x": 29.19, "y": -24.9, "rotation": -88.93, "width": 34, "height": 12 }
+			},
+			"left-shoulder": {
+				"left-shoulder": {
+					"name": "goblin/left-shoulder",
+					"type": "mesh",
+					"uvs": [ 0.7377, 0.40692, 1, 0.75238, 1, 1, 0.62046, 1, 0.26184, 0.56602, 0, 0.29783, 0, 0, 0.44115, 0 ],
+					"triangles": [ 3, 1, 2, 3, 0, 1, 3, 4, 0, 4, 7, 0, 4, 5, 7, 5, 6, 7 ],
+					"vertices": [ 15.18, 5.74, 32.17, 5.33, 41.79, 0.22, 36.63, -9.5, 14.89, -9.73, 0.9, -10.9, -10.67, -4.75, -4.67, 6.55 ],
+					"hull": 8,
+					"edges": [ 12, 14, 14, 0, 4, 2, 0, 2, 4, 6, 6, 8, 10, 12, 8, 10 ],
+					"width": 29,
+					"height": 44
+				}
+			},
+			"pelvis": {
+				"pelvis": {
+					"name": "goblin/pelvis",
+					"type": "mesh",
+					"uvs": [ 1, 1, 0, 1, 0, 0, 1, 0 ],
+					"triangles": [ 1, 2, 3, 1, 3, 0 ],
+					"vertices": [ 25.38, -20.73, -36.62, -20.73, -36.62, 22.27, 25.38, 22.27 ],
+					"hull": 4,
+					"edges": [ 0, 2, 2, 4, 4, 6, 0, 6 ],
+					"width": 62,
+					"height": 43
+				}
+			},
+			"right-arm": {
+				"right-arm": {
+					"name": "goblin/right-arm",
+					"type": "mesh",
+					"uvs": [ 1, 0.09223, 1, 0.8501, 0.72058, 1, 0.24385, 1, 0, 0.86559, 0.20823, 0.1092, 0.50903, 0, 0.85342, 0 ],
+					"triangles": [ 1, 2, 6, 6, 2, 5, 1, 6, 0, 4, 5, 3, 2, 3, 5, 6, 7, 0 ],
+					"vertices": [ -4.75, 8.89, 33.03, 11.74, 40.99, 5.9, 41.82, -5.03, 35.54, -11.13, -2.54, -9.2, -8.5, -2.72, -9.1, 5.18 ],
+					"hull": 8,
+					"edges": [ 8, 6, 4, 6, 4, 2, 12, 14, 2, 0, 14, 0, 10, 12, 8, 10 ],
+					"width": 23,
+					"height": 50
+				}
+			},
+			"right-shoulder": {
+				"right-shoulder": {
+					"name": "goblin/right-shoulder",
+					"type": "mesh",
+					"uvs": [ 0.62008, 0.03709, 0.92131, 0.09049, 1, 0.3832, 0.72049, 0.69371, 0.31657, 1, 0, 1, 0, 0.75106, 0.28234, 0.49989 ],
+					"triangles": [ 4, 6, 7, 4, 7, 3, 4, 5, 6, 7, 0, 3, 2, 0, 1, 2, 3, 0 ],
+					"vertices": [ -3.17, -11.05, -9, -0.58, -1.01, 10.34, 16.69, 11.17, 37.41, 8.2, 45.46, -1.16, 36.96, -8.46, 21.21, -7.48 ],
+					"hull": 8,
+					"edges": [ 10, 12, 12, 14, 14, 0, 0, 2, 2, 4, 4, 6, 8, 10, 6, 8 ],
+					"width": 39,
+					"height": 45
+				}
+			},
+			"right-upper-leg": {
+				"right-upper-leg": {
+					"name": "goblin/right-upper-leg",
+					"type": "mesh",
+					"uvs": [ 0.27019, 0, 0.11619, 0.18177, 0, 0.70688, 0, 0.89577, 0.26669, 1, 0.48719, 1, 0.67619, 0.83533, 1, 0.5161, 1, 0.25544, 0.74619, 0.0571 ],
+					"triangles": [ 9, 8, 7, 9, 1, 0, 6, 9, 7, 6, 1, 9, 2, 1, 6, 4, 3, 2, 6, 4, 2, 5, 4, 6 ],
+					"vertices": [ -9.86, -10.37, 2.18, -14.07, 35.49, -13.67, 47.29, -12.11, 52.62, -2.27, 51.64, 5.17, 40.51, 10.18, 19.14, 18.47, 2.85, 16.33, -8.41, 6.14 ],
+					"hull": 10,
+					"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18 ],
+					"width": 34,
+					"height": 63
+				}
+			},
+			"torso": {
+				"torso": {
+					"name": "goblin/torso",
+					"type": "mesh",
+					"uvs": [ 0, 0.33288, 0.15946, 0.46489, 0.15762, 0.60314, 0.15502, 0.79806, 0.32808, 0.93479, 0.68751, 1, 0.80732, 1, 1, 0.77763, 1, 0.66148, 1, 0.56704, 0.93208, 0.4771, 0.86944, 0.39417, 0.83838, 0.22601, 0.68085, 0, 0.14836, 0, 0, 0.07199, 0.78735, 0.8625, 0.43679, 0.79649, 0.76738, 0.61733, 0.44345, 0.58747, 0.54329, 0.38317, 0.77692, 0.73447, 0.66479, 0.51012 ],
+					"triangles": [ 5, 16, 6, 6, 16, 7, 4, 17, 5, 5, 17, 16, 4, 3, 17, 17, 21, 16, 16, 21, 7, 3, 2, 17, 21, 19, 18, 21, 17, 19, 17, 2, 19, 21, 8, 7, 21, 18, 8, 18, 9, 8, 19, 22, 18, 18, 10, 9, 18, 22, 10, 2, 1, 19, 19, 20, 22, 19, 1, 20, 22, 11, 10, 22, 20, 11, 20, 1, 14, 20, 12, 11, 1, 0, 14, 20, 13, 12, 20, 14, 13, 0, 15, 14 ],
+					"vertices": [ 56.93, 27.95, 43.37, 18.24, 30.16, 19.5, 11.53, 21.29, -2.55, 10.69, -10.89, -13.12, -11.59, -21.24, 8.55, -36.13, 19.66, -37.09, 28.69, -37.86, 37.69, -34.01, 45.99, -30.45, 56.4, -29.07, 84.79, -20.92, 87.9, 15.15, 81.89, 25.8, 1.67, -21.02, 10.04, 2.19, 25.23, -18.25, 29.99, 0.01, 48.54, -8.4, 13.98, -21.37, 35.91, -15.6 ],
+					"hull": 16,
+					"edges": [ 0, 2, 6, 8, 8, 10, 10, 12, 12, 14, 22, 24, 24, 26, 26, 28, 28, 30, 0, 30, 14, 32, 32, 34, 34, 6, 18, 36, 36, 38, 2, 4, 4, 6, 38, 4, 2, 40, 40, 22, 40, 38, 38, 34, 32, 10, 34, 8, 40, 28, 14, 16, 16, 18, 32, 42, 42, 36, 16, 42, 42, 34, 18, 20, 20, 22, 36, 44, 44, 40, 20, 44 ],
+					"width": 68,
+					"height": 96
+				}
+			},
+			"left-foot": {
+				"left-foot": {
+					"name": "goblin/left-foot",
+					"type": "mesh",
+					"uvs": [ 0.15734, 0.31874, 0.08195, 0.78503, 0.15884, 0.99367, 0.41633, 0.96805, 0.68823, 0.97637, 1, 0.96388, 0.99386, 0.73501, 0.85295, 0.51863, 0.61479, 0.31056, 0.46992, 0, 0.48033, 0.75604, 0.75995, 0.77706 ],
+					"triangles": [ 0, 9, 8, 10, 0, 8, 10, 8, 7, 11, 10, 7, 11, 7, 6, 1, 0, 10, 11, 6, 5, 3, 1, 10, 4, 10, 11, 4, 11, 5, 3, 10, 4, 2, 1, 3 ],
+					"vertices": [ 2.28, 13.07, -1.77, -1.64, 3.6, -7.81, 20.26, -6.04, 37.92, -5.28, 58.13, -3.71, 57.32, 3.35, 47.78, 9.51, 31.95, 15.05, 21.99, 24.12, 24.03, 0.76, 42.21, 1.16 ],
+					"hull": 10,
+					"edges": [ 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 16, 18, 0, 18, 6, 20, 20, 16, 2, 20, 8, 22, 22, 14, 20, 22, 22, 10 ],
+					"width": 65,
+					"height": 31
+				}
+			},
+			"left-hand": {
+				"left-hand": {
+					"name": "goblin/left-hand",
+					"type": "mesh",
+					"uvs": [ 0.51801, 0.12578, 1, 0.16286, 0.99789, 0.50578, 0.69745, 1, 0.37445, 1, 0, 0.80051, 0, 0.42793, 0.17601, 0, 0.43568, 0 ],
+					"triangles": [ 2, 0, 1, 0, 5, 6, 6, 7, 0, 0, 7, 8, 3, 4, 0, 4, 5, 0, 2, 3, 0 ],
+					"vertices": [ -3.11, 15.43, 10.84, 22.27, 15.5, 14.56, 18.36, -8.96, 9.48, -14.33, -4.59, -14.3, -11.64, -2.64, -14.89, 13.68, -7.76, 18 ],
+					"hull": 9,
+					"edges": [ 16, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 14, 16, 12, 14 ],
+					"width": 36,
+					"height": 41
+				}
+			},
+			"left-lower-leg": {
+				"left-lower-leg": {
+					"name": "goblin/left-lower-leg",
+					"type": "mesh",
+					"uvs": [ 0.95509, 0.2075, 0.81927, 0.65214, 0.94754, 0.77308, 0.67842, 0.97347, 0.46464, 1, 0.26845, 1, 0.04964, 0.90707, 0.21061, 0.60115, 0.07479, 0.40195, 0.18545, 0, 0.28858, 0 ],
+					"triangles": [ 10, 8, 9, 1, 7, 10, 7, 8, 10, 0, 1, 10, 1, 4, 7, 3, 1, 2, 5, 6, 7, 7, 4, 5, 1, 3, 4 ],
+					"vertices": [ -0.2, 6.82, 30.97, 10.96, 37.97, 17.34, 53.88, 12.6, 57.59, 6.32, 59.35, 0.09, 55.05, -8.63, 33, -9.34, 20.8, -17.44, -7.28, -21.57, -8.2, -18.29 ],
+					"hull": 11,
+					"edges": [ 20, 0, 0, 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 14, 14, 16, 18, 20, 16, 18 ],
+					"width": 33,
+					"height": 70
+				}
+			},
+			"right-foot": {
+				"right-foot": {
+					"name": "goblin/right-foot",
+					"type": "mesh",
+					"uvs": [ 0.40851, 0.00471, 0.59088, 0.33404, 0.75959, 0.48311, 0.88907, 0.59751, 0.97533, 0.89392, 0.90386, 1, 0.6722, 1, 0.38633, 1, 0.08074, 1, 0, 0.88921, 0, 0.65985, 0, 0.46578, 0.0906, 0.0988, 0.305, 0, 0.47461, 0.71258, 0.71501, 0.74681 ],
+					"triangles": [ 1, 10, 11, 1, 13, 0, 14, 1, 2, 1, 12, 13, 12, 1, 11, 14, 10, 1, 15, 14, 2, 15, 2, 3, 9, 10, 14, 15, 3, 4, 7, 8, 9, 14, 7, 9, 6, 14, 15, 5, 6, 15, 7, 14, 6, 4, 5, 15 ],
+					"vertices": [ 17.36, 26, 29.14, 15.44, 39.89, 10.81, 48.15, 7.25, 53.84, -2.38, 49.43, -6, 34.85, -6.39, 16.84, -6.87, -2.4, -7.38, -7.59, -3.87, -7.79, 3.7, -7.96, 10.1, -2.57, 22.36, 10.84, 25.98, 22.15, 2.76, 37.32, 2.03 ],
+					"hull": 14,
+					"edges": [ 0, 2, 6, 8, 8, 10, 16, 18, 22, 24, 24, 26, 0, 26, 10, 12, 2, 4, 4, 6, 12, 14, 14, 16, 18, 20, 20, 22, 2, 28, 28, 14, 20, 28, 4, 30, 30, 12, 28, 30, 30, 8 ],
+					"width": 63,
+					"height": 33
+				}
+			}
+		}
+	},
+	{
+		"name": "goblingirl",
+		"attachments": {
+			"right-hand": {
+				"right-hand": { "name": "goblingirl/right-hand", "x": 7.22, "y": 3.44, "rotation": 91.17, "width": 36, "height": 37 }
+			},
+			"right-hand-thumb": {
+				"right-hand-thumb": { "name": "goblingirl/right-hand", "x": 7.22, "y": 3.44, "rotation": 91.17, "width": 36, "height": 37 }
+			},
+			"undies": {
+				"undies": { "name": "goblingirl/undies", "x": 5.4, "y": 1.71, "width": 36, "height": 29 }
+			},
+			"right-lower-leg": {
+				"right-lower-leg": { "name": "goblingirl/right-lower-leg", "x": 26.15, "y": -3.28, "rotation": 111.84, "width": 36, "height": 76 }
+			},
+			"left-arm": {
+				"left-arm": { "name": "goblingirl/left-arm", "x": 19.64, "y": -2.43, "rotation": 33.05, "width": 37, "height": 35 }
+			},
+			"undie-straps": {
+				"undie-straps": { "name": "goblingirl/undie-straps", "x": -1.52, "y": 14.19, "width": 55, "height": 19 }
+			},
+			"left-upper-leg": {
+				"left-upper-leg": { "name": "goblingirl/left-upper-leg", "x": 30.22, "y": -2.95, "rotation": 89.1, "width": 33, "height": 70 }
+			},
+			"neck": {
+				"neck": { "name": "goblingirl/neck", "x": 6.16, "y": -3.15, "rotation": -98.86, "width": 35, "height": 41 }
+			},
+			"head": {
+				"head": { "name": "goblingirl/head", "x": 27.72, "y": -4.32, "rotation": -85.58, "width": 103, "height": 81 }
+			},
+			"eyes": {
+				"eyes-closed": { "name": "goblingirl/eyes-closed", "x": 28, "y": -25.55, "rotation": -87.05, "width": 37, "height": 21 }
+			},
+			"left-shoulder": {
+				"left-shoulder": { "name": "goblingirl/left-shoulder", "x": 19.81, "y": -0.43, "rotation": 61.22, "width": 28, "height": 46 }
+			},
+			"pelvis": {
+				"pelvis": { "name": "goblingirl/pelvis", "x": -3.88, "y": 3.19, "width": 62, "height": 43 }
+			},
+			"right-arm": {
+				"right-arm": { "name": "goblingirl/right-arm", "x": 16.85, "y": -0.66, "rotation": 93.53, "width": 28, "height": 50 }
+			},
+			"right-shoulder": {
+				"right-shoulder": { "name": "goblingirl/right-shoulder", "x": 14.46, "y": 0.46, "rotation": 129.85, "width": 39, "height": 45 }
+			},
+			"right-upper-leg": {
+				"right-upper-leg": { "name": "goblingirl/right-upper-leg", "x": 19.7, "y": 2.13, "rotation": 97.5, "width": 34, "height": 63 }
+			},
+			"torso": {
+				"torso": { "name": "goblingirl/torso", "x": 36.28, "y": -5.14, "rotation": -95.75, "width": 68, "height": 96 }
+			},
+			"left-foot": {
+				"left-foot": { "name": "goblingirl/left-foot", "type": "linkedmesh", "skin": "goblin", "parent": "left-foot", "width": 65, "height": 31 }
+			},
+			"left-hand": {
+				"left-hand": {
+					"name": "goblingirl/left-hand",
+					"x": 4.34,
+					"y": 2.39,
+					"scaleX": 0.8965,
+					"scaleY": 0.8965,
+					"rotation": 30.35,
+					"width": 35,
+					"height": 40
+				}
+			},
+			"left-lower-leg": {
+				"left-lower-leg": { "name": "goblingirl/left-lower-leg", "x": 25.02, "y": -0.61, "rotation": 105.76, "width": 33, "height": 70 }
+			},
+			"right-foot": {
+				"right-foot": { "name": "goblingirl/right-foot", "type": "linkedmesh", "skin": "goblin", "parent": "right-foot", "width": 63, "height": 33 }
+			}
+		}
+	}
+],
+"animations": {
+	"walk": {
+		"slots": {
+			"eyes": {
+				"attachment": [
+					{ "time": 0.7, "name": "eyes-closed" },
+					{ "time": 0.8, "name": null }
+				]
+			}
+		},
+		"bones": {
+			"left-upper-leg": {
+				"rotate": [
+					{ "angle": -26.56 },
+					{ "time": 0.1333, "angle": -8.79 },
+					{ "time": 0.2333, "angle": 9.51 },
+					{ "time": 0.3667, "angle": 30.74 },
+					{ "time": 0.5, "angle": 25.34 },
+					{ "time": 0.6333, "angle": 26.12 },
+					{ "time": 0.7333, "angle": 7.45 },
+					{ "time": 0.8667, "angle": -21.19 },
+					{ "time": 1, "angle": -26.56 }
+				],
+				"translate": [
+					{ "x": -1.32, "y": 1.71 },
+					{ "time": 0.3667, "x": -0.06, "y": 2.43 },
+					{ "time": 1, "x": -1.32, "y": 1.71 }
+				]
+			},
+			"right-upper-leg": {
+				"rotate": [
+					{ "angle": 42.45 },
+					{ "time": 0.1333, "angle": 49.86, "curve": 0.414, "c3": 0.706, "c4": 0.99 },
+					{ "time": 0.2333, "angle": 22.51 },
+					{ "time": 0.5, "angle": -16.94 },
+					{ "time": 0.6333, "angle": 1.9 },
+					{ "time": 0.7333, "angle": 34.87, "curve": 0.463, "c2": 0.12 },
+					{ "time": 0.8667, "angle": 58.69, "curve": 0.5, "c2": 0.02 },
+					{ "time": 1, "angle": 42.45 }
+				],
+				"translate": [
+					{ "x": 6.24 },
+					{ "time": 0.2333, "x": 2.14, "y": 2.4 },
+					{ "time": 0.5, "x": 2.44, "y": 4.8 },
+					{ "time": 1, "x": 6.24 }
+				]
+			},
+			"left-lower-leg": {
+				"rotate": [
+					{ "angle": -18.05 },
+					{ "time": 0.1333, "angle": -63.51 },
+					{ "time": 0.2333, "angle": -83.02 },
+					{ "time": 0.5, "angle": 5.12 },
+					{ "time": 0.6333, "angle": -28.3 },
+					{ "time": 0.7333, "angle": -27.52 },
+					{ "time": 0.8667, "angle": 3.53 },
+					{ "time": 1, "angle": -18.05 }
+				],
+				"translate": [
+					{},
+					{ "time": 0.2333, "x": 2.56, "y": -0.47 },
+					{ "time": 0.5 }
+				]
+			},
+			"left-foot": {
+				"rotate": [
+					{ "angle": -14.57 },
+					{ "time": 0.1333, "angle": -10.42 },
+					{ "time": 0.2333, "angle": -5.01 },
+					{ "time": 0.3, "angle": 6.67 },
+					{ "time": 0.3667, "angle": 3.87 },
+					{ "time": 0.5, "angle": -3.88 },
+					{ "time": 0.6333, "angle": 2.78 },
+					{ "time": 0.7333, "angle": -12 },
+					{ "time": 0.8667, "angle": -12.45 },
+					{ "time": 1, "angle": -14.57 }
+				]
+			},
+			"right-shoulder": {
+				"rotate": [
+					{ "angle": 5.29, "curve": 0.264, "c3": 0.75 },
+					{ "time": 0.6333, "angle": 6.65 },
+					{ "time": 1, "angle": 5.29 }
+				]
+			},
+			"right-arm": {
+				"rotate": [
+					{ "angle": -4.03, "curve": 0.267, "c2": 0.01, "c3": 0.805, "c4": 0.99 },
+					{ "time": 0.6333, "angle": 19.79, "curve": 0.307, "c3": 0.787, "c4": 0.99 },
+					{ "time": 1, "angle": -4.03 }
+				]
+			},
+			"right-hand": {
+				"rotate": [
+					{ "angle": 8.99 },
+					{ "time": 0.6333, "angle": 0.51 },
+					{ "time": 1, "angle": 8.99 }
+				]
+			},
+			"left-shoulder": {
+				"rotate": [
+					{ "angle": 6.26, "curve": 0.339, "c3": 0.684 },
+					{ "time": 0.5, "angle": -11.79, "curve": 0.282, "c3": 0.687, "c4": 0.99 },
+					{ "time": 1, "angle": 6.26 }
+				],
+				"translate": [
+					{ "x": 1.15, "y": 0.24 }
+				]
+			},
+			"left-hand": {
+				"rotate": [
+					{ "angle": -21.24, "curve": 0.296, "c3": 0.756, "c4": 0.99 },
+					{ "time": 0.5, "angle": -27.28, "curve": 0.241, "c3": 0.75, "c4": 0.97 },
+					{ "time": 1, "angle": -21.24 }
+				]
+			},
+			"left-arm": {
+				"rotate": [
+					{ "angle": 28.38, "curve": 0.339, "c3": 0.684 },
+					{ "time": 0.5, "angle": 60.09, "curve": 0.282, "c3": 0.687, "c4": 0.99 },
+					{ "time": 1, "angle": 28.38 }
+				]
+			},
+			"torso": {
+				"rotate": [
+					{ "angle": -10.28 },
+					{ "time": 0.1333, "angle": -15.39, "curve": 0.546, "c2": 0.01, "c3": 0.819 },
+					{ "time": 0.3667, "angle": -9.78, "curve": 0.58, "c2": 0.17, "c3": 0.67, "c4": 0.99 },
+					{ "time": 0.6333, "angle": -15.75, "curve": 0.236, "c2": 0.01, "c3": 0.796 },
+					{ "time": 0.8667, "angle": -7.07, "curve": 0.21, "c3": 0.816, "c4": 0.99 },
+					{ "time": 1, "angle": -10.28 }
+				]
+			},
+			"right-foot": {
+				"rotate": [
+					{ "angle": -5.25 },
+					{ "time": 0.2333, "angle": -17.77 },
+					{ "time": 0.3667, "angle": -20.1 },
+					{ "time": 0.5, "angle": -19.74 },
+					{ "time": 0.7333, "angle": -11.69 },
+					{ "time": 0.8, "angle": 4.47 },
+					{ "time": 0.8667, "angle": 0.46 },
+					{ "time": 1, "angle": -5.25 }
+				]
+			},
+			"right-lower-leg": {
+				"rotate": [
+					{ "angle": -3.39, "curve": 0.316, "c2": 0.02, "c3": 0.741, "c4": 0.99 },
+					{ "time": 0.1333, "angle": -43.22, "curve": 0.414, "c3": 0.706, "c4": 0.99 },
+					{ "time": 0.2333, "angle": -25.98 },
+					{ "time": 0.5, "angle": -19.53 },
+					{ "time": 0.6333, "angle": -64.8 },
+					{ "time": 0.7333, "angle": -89.54, "curve": 0.557, "c2": 0.18 },
+					{ "time": 1, "angle": -3.39 }
+				],
+				"translate": [
+					{ "time": 0.5 },
+					{ "time": 0.6333, "x": 2.19, "y": 0.21 },
+					{ "time": 1 }
+				]
+			},
+			"hip": {
+				"translate": [
+					{ "y": -8.4 },
+					{ "time": 0.1333, "y": -9.35, "curve": 0.327, "c2": 0.05, "c3": 0.675, "c4": 0.94 },
+					{ "time": 0.2333, "y": -0.59, "curve": 0.326, "c2": 0.39, "c3": 0.644, "c4": 0.7 },
+					{ "time": 0.3667, "y": -3.97 },
+					{ "time": 0.5, "y": -8.4 },
+					{ "time": 0.6333, "y": -10.01, "curve": 0.359, "c2": 0.47, "c3": 0.647, "c4": 0.75 },
+					{ "time": 0.7333, "y": -5.3, "curve": 0.333, "c2": 0.37, "c3": 0.663, "c4": 0.69 },
+					{ "time": 0.8, "y": -2.5, "curve": 0.322, "c2": 0.35, "c3": 0.652, "c4": 0.68 },
+					{ "time": 0.8667, "y": -3.97 },
+					{ "time": 1, "y": -8.4 }
+				]
+			},
+			"neck": {
+				"rotate": [
+					{ "angle": 3.6 },
+					{ "time": 0.1333, "angle": 17.5 },
+					{ "time": 0.2333, "angle": 6.11 },
+					{ "time": 0.3667, "angle": 3.46 },
+					{ "time": 0.5, "angle": 5.18 },
+					{ "time": 0.6333, "angle": 18.36 },
+					{ "time": 0.7333, "angle": 6.09 },
+					{ "time": 0.8667, "angle": 2.29 },
+					{ "time": 1, "angle": 3.6 }
+				]
+			},
+			"head": {
+				"rotate": [
+					{ "angle": 3.6, "curve": 0, "c3": 0.704, "c4": 1.18 },
+					{ "time": 0.1333, "angle": -0.21 },
+					{ "time": 0.2333, "angle": 6.11 },
+					{ "time": 0.3667, "angle": 3.46 },
+					{ "time": 0.5, "angle": 5.18, "curve": 0, "c3": 0.704, "c4": 1.62 },
+					{ "time": 0.6667, "angle": 1.11 },
+					{ "time": 0.7333, "angle": 6.09 },
+					{ "time": 0.8667, "angle": 2.29 },
+					{ "time": 1, "angle": 3.6 }
+				]
+			},
+			"pelvis": {
+				"rotate": [
+					{ "angle": -1.34 }
+				],
+				"translate": [
+					{ "x": 0.39, "y": -0.78 }
+				]
+			},
+			"spear1": {
+				"rotate": [
+					{ "angle": 1.85 },
+					{ "time": 0.2, "angle": -5.39 },
+					{ "time": 0.5, "angle": 2.95 },
+					{ "time": 0.7333, "angle": -3.67 },
+					{ "time": 1, "angle": 1.85 }
+				]
+			},
+			"spear2": {
+				"rotate": [
+					{ "angle": 1.85 },
+					{ "time": 0.2, "angle": -5.39 },
+					{ "time": 0.5, "angle": 2.95 },
+					{ "time": 0.7333, "angle": -3.67 },
+					{ "time": 1, "angle": 1.85 }
+				]
+			},
+			"spear3": {
+				"rotate": [
+					{ "angle": 3.64 },
+					{ "time": 0.2, "angle": -3.6 },
+					{ "time": 0.5, "angle": 4.74 },
+					{ "time": 0.7333, "angle": -1.88 },
+					{ "time": 1, "angle": 3.64 }
+				]
+			}
+		},
+		"deform": {
+			"default": {
+				"right-hand-item": {
+					"dagger": [
+						{
+							"offset": 26,
+							"vertices": [ 2.34755, 0.1447 ],
+							"curve": 0.25,
+							"c3": 0.75
+						},
+						{
+							"time": 0.5,
+							"offset": 8,
+							"vertices": [ -1.19415, 4.31532, 0.07279, 6.41351, 1.66048, 6.18883, 1.75233, 3.59555 ],
+							"curve": 0.25,
+							"c3": 0.75
+						},
+						{
+							"time": 1,
+							"offset": 26,
+							"vertices": [ 2.34755, 0.1447 ]
+						}
+					]
+				}
+			},
+			"goblin": {
+				"undies": {
+					"undies": [
+						{
+							"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
+						},
+						{
+							"time": 0.1333,
+							"vertices": [ 0.72659, 0.4332, 7.20417, -0.1638, 1.37759, 0, 1.37759, 0, 1.37759, 0, 1.25279, 0.0464, -0.99862, -2.95085, -1.37543, -3.07404, 1.37759, 0, 0.35279, -0.2928, 2.99219, -0.0702, 3.90478, -0.1404 ]
+						},
+						{
+							"time": 0.3333,
+							"vertices": [ 1.16999, 0, 2.10599, -0.23401, 0, 0, 0, 0, 0, 0, 2.24999, -0.24999, -0.4344, 0.60551, -1.55939, 0.48051 ]
+						},
+						{
+							"time": 0.5333,
+							"vertices": [ 1.16999, 0, -0.234, -0.936, -2.92499, 0.351, 0, 0, 0, 0, 0.5, -0.24999, -0.64079, -2.07915, -0.64079, -2.07915 ]
+						},
+						{
+							"time": 0.7,
+							"vertices": [ 1.86271, -0.11514, 4.66327, -0.091, -1.76428, 0.21171, 0, 0, -0.56833, 0.32833, -1.13833, -1.15111, -2.19996, -3.47068, -1.29719, -3.47068, 0, 0, 0, 0, 1.58785, -0.04643, 2.65942, 0.16715 ]
+						},
+						{
+							"time": 0.8333,
+							"vertices": [ 2.41688, -0.20726, 8.58108, 0.585, -0.83571, 0.10029, 0, 0, -1.02299, 0.59099, -2.449, -1.872, -1.625, 0, 0, 0, 0, 0, 0, 0, 2.85813, -0.08357, 4.78695, 0.30086 ]
+						},
+						{
+							"time": 0.8667,
+							"vertices": [ 2.0197, -0.02141, 8.98546, 0.4446, -0.20937, 0.08023, 0.4592, 0, -0.3592, 0.47279, -1.8416, -1.4488, -0.79153, 1.26421, 0.53286, 1.23981, 0.4592, 0, 0.1176, -0.0976, 3.2839, -0.09025, 5.13116, 0.19389 ]
+						},
+						{
+							"time": 1,
+							"vertices": [ 0.43099, 0.722, 10.60295, -0.117, 2.29599, 0, 2.29599, 0, 2.29599, 0, 0.58799, 0.244, -2.40018, -0.65335, -2.2782, -0.77534, 2.29599, 0, 0.58799, -0.488, 4.98698, -0.117, 6.50797, -0.23399 ]
+						}
+					]
+				},
+				"head": {
+					"head": [
+						{ "curve": 0.633, "c3": 0.75 },
+						{
+							"time": 0.2,
+							"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392, -1.08534, 0.08392, -1.08534, 0.08392, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.08534, 0.08392 ],
+							"curve": 0.25,
+							"c3": 0.75
+						},
+						{
+							"time": 0.3667,
+							"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018, 1.47305, 0.09018, 1.47305, 0.09018, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.47305, 0.09018 ],
+							"curve": 0.621,
+							"c3": 0.75
+						},
+						{
+							"time": 0.7,
+							"vertices": [ -10.97827, -6.68962, -4.68015, -2.46175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183, -1.17551, -0.17183, -1.17551, -0.17183, 0, 0, -2.22325, 2.66465, -4.83295, 2.70085, -5.70553, -0.51941, -3.15962, -1.61502, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6.64742, 0.81612, -11.82286, -1.34955, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.17551, -0.17183 ],
+							"curve": 0.25,
+							"c3": 0.75
+						},
+						{
+							"time": 0.8667,
+							"vertices": [ 10.69276, 4.05949, 3.66373, 1.85427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446, 0.38687, 0.08446, 0.38687, 0.08446, 0, 0, 2.69653, -0.22738, 3.77135, 0.11418, 3.6893, 1.55352, 2.49595, 1.65501, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.45881, -3.9113, 9.19594, -1.66854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.38687, 0.08446 ],
+							"curve": 0.25,
+							"c3": 0.75
+						},
+						{ "time": 1 }
+					]
+				},
+				"right-hand": {
+					"right-hand": [
+						{
+							"offset": 4,
+							"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
+						},
+						{ "time": 0.5 },
+						{
+							"time": 1,
+							"offset": 4,
+							"vertices": [ -1.48417, 0.34736, 0, 0, 1.31152, 0.08085, 1.60296, 0.09882, 0.13673, 0.15471, 0, 0, 0, 0, -0.72862, -0.0449 ]
+						}
+					]
+				},
+				"right-foot": {
+					"right-foot": [
+						{},
+						{
+							"time": 0.1333,
+							"offset": 2,
+							"vertices": [ -2.81259, 2.63115, -2.35238, 3.89441, -1.99921, 4.8639, -0.93273, 5.57982, -0.48886, 5.09855, -0.34813, 3.42912, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.31305, 1.91372, -1.32986, 3.65703 ]
+						},
+						{
+							"time": 0.2333,
+							"offset": 2,
+							"vertices": [ -6.39088, 6.41246, -7.74575, 8.27192, -7.02471, 11.35894, -4.03471, 13.93454, -2.50399, 12.62963, -1.46125, 7.58915, -0.17446, 1.36899, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3.84766, 2.61216, -4.53956, 7.92358 ]
+						},
+						{
+							"time": 0.3,
+							"offset": 2,
+							"vertices": [ -8.27185, 6.68822, -9.29764, 10.13797, -8.62231, 14.7134, -4.5863, 18.81939, -2.20304, 17.10709, -0.07795, 9.9046, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.94625, 2.38008, -4.59399, 10.01888 ]
+						},
+						{
+							"time": 0.3667,
+							"offset": 2,
+							"vertices": [ -10.47684, 9.44176, -13.36883, 12.40983, -14.32569, 16.94392, -9.24463, 23.55674, -5.51712, 21.51378, -1.19582, 11.53193, 2.54452, 1.01642, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4.14848, 2.29389, -6.63419, 11.37127 ]
+						},
+						{
+							"time": 0.5,
+							"offset": 2,
+							"vertices": [ -5.42474, 4.36854, -10.59004, 7.04468, -11.64251, 11.55845, -6.19665, 20.12806, -1.45498, 18.05411, 4.8662, 6.41679, 2.81463, 0.27601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.96412, 4.9483 ]
+						},
+						{ "time": 0.6333 },
+						{
+							"time": 0.7333,
+							"offset": 4,
+							"vertices": [ 1.31462, -6.84099, -0.87905, -12.54479, -5.9851, -14.08368, -7.15892, -11.63194, -5.6792, -4.83545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2.06164, -6.93844 ]
+						},
+						{
+							"time": 0.8,
+							"offset": 4,
+							"vertices": [ 0.65731, -3.4205, -0.43953, -6.2724, -2.99255, -7.04184, -3.57946, -5.81597, -2.8396, -2.41772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.79688, -1.28021, 0, 0, 0, 0, -1.03082, -3.46922 ]
+						},
+						{ "time": 0.8667 }
+					]
+				},
+				"torso": {
+					"torso": [
+						{
+							"offset": 2,
+							"vertices": [ 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, 0.24821, 2.86673, -1.24131, 2.62652, -2.47492, 0.71183, -0.26363, -0.5308, 0.24821, 2.86673, 0.24821, 2.86673, 0, 0, 0, 0, 0, 0, 0, 0, 1.34461, 0.25215, 0.24821, 2.86673, 0.82507, 1.61798, 0.24821, 2.86673, 0, 0, -1.86431, -0.4326, 0.24821, 2.86673 ]
+						},
+						{
+							"time": 0.1333,
+							"offset": 2,
+							"vertices": [ 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 0.35589, 4.10914, 1.66908, 3.51187, -0.62355, 2.47979, 1.1045, 3.49684, -1.09009, 6.08429, 0.35589, 4.10914, 0, 0, 0, 0, 0, 0, 0, 0, 3.01291, 0.15693, 0.35589, 4.10914, -1.11398, 3.7954, 0.35589, 4.10914, 0, 0, -2.96167, 0.55563, -2.20741, 4.40587 ]
+						},
+						{
+							"time": 0.3,
+							"offset": 2,
+							"vertices": [ 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 0.2884, 3.32948, 6.32601, 0.19387, 7.84315, 1.94837, 7.08587, 3.64119, 4.52343, 4.46961, 0.2884, 3.32948, 0, 0, 0, 0, 0, 0, 0, 0, 4.36416, -1.83876, 0.2884, 3.32948, 4.2925, 3.60194, 0.2884, 3.32948, 0, 0, 3.72601, -0.19338, 0.2884, 3.32948 ]
+						},
+						{
+							"time": 0.5,
+							"offset": 2,
+							"vertices": [ 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 0.3133, 3.61659, 2.57273, 2.74457, 2.88831, 3.04797, 3.48442, 3.04655, 1.80035, 4.609, 0.3133, 3.61659, 0, 0, 0, 0, 0, 0, 0, 0, 3.53782, -0.82203, 0.3133, 3.61659, 1.80022, 3.63246, 0.3133, 3.61659, 0, 0, 0.62718, 0.33564, -1.22467, 3.79463 ]
+						},
+						{
+							"time": 0.6333,
+							"offset": 2,
+							"vertices": [ 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 0.44398, 5.125, 1.19401, 3.60798, -0.53546, 3.49565, 1.1926, 4.5127, -1.002, 7.10015, 0.44398, 5.125, 0, 0, 0, 0, 0, 0, 0, 0, 3.101, 1.17278, 0.44398, 5.125, -1.02589, 4.81126, 0.44398, 5.125, 0, 0, -2.87358, 1.57149, -2.11931, 5.42173 ]
+						},
+						{
+							"time": 0.8667,
+							"offset": 2,
+							"vertices": [ 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.30385, 3.50647, 0.92587, 2.24385, 0.68874, 1.29945, 3.55433, 3.00604, 2.71494, 5.89962, 0.30385, 3.50647, 0, 0, 0, 0, 0, 0, 0, 0, 1.96775, 0.40548, 0.30385, 3.50647, 2.6104, 2.3545, 0.30385, 3.50647, 0, 0, 0.22709, -0.12851, -0.62826, 3.61437 ]
+						},
+						{
+							"time": 1,
+							"offset": 2,
+							"vertices": [ 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, 0.32802, 3.78826, -1.1615, 3.54805, -2.39511, 1.63336, -0.18382, 0.39073, 0.32802, 3.78826, 0.32802, 3.78826, 0, 0, 0, 0, 0, 0, 0, 0, 1.42442, 1.17368, 0.32802, 3.78826, 0.90488, 2.53951, 0.32802, 3.78826, 0, 0, -1.7845, 0.48894, 0.32802, 3.78826 ]
+						}
+					]
+				},
+				"right-lower-leg": {
+					"right-lower-leg": [
+						{},
+						{
+							"time": 0.6,
+							"offset": 6,
+							"vertices": [ 1.80396, -1.56553 ]
+						},
+						{ "time": 1 }
+					]
+				},
+				"right-upper-leg": {
+					"right-upper-leg": [
+						{
+							"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
+						},
+						{ "time": 0.3333 },
+						{
+							"time": 0.8667,
+							"offset": 14,
+							"vertices": [ 0.13425, -2.35378, -1.33318, -5.99573, -1.35862, -4.43324 ]
+						},
+						{
+							"time": 1,
+							"vertices": [ -6.03857, -1.46325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -0.34685, -1.93102, -1.86047, -5.05266, -2.5014, -3.09985 ]
+						}
+					]
+				},
+				"left-foot": {
+					"left-foot": [
+						{
+							"offset": 8,
+							"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
+						},
+						{ "time": 0.1333 },
+						{
+							"time": 0.2333,
+							"offset": 8,
+							"vertices": [ -3.96073, -2.34594, -5.80446, -12.47629, -2.2313, -12.99038, 2.02942, -9.1036, 0, 0, 0, 0, 0, 0, -1.35254, -5.2883 ]
+						},
+						{
+							"time": 0.3667,
+							"offset": 8,
+							"vertices": [ 0.66505, 0.33548, 0.33902, 2.69014, -0.48171, 2.54524, -1.13593, 1.38562, 0, 0, 0, 0, 0, 0, -0.11908, 0.79273 ]
+						},
+						{ "time": 0.5, "curve": "stepped" },
+						{ "time": 0.6333 },
+						{
+							"time": 0.7333,
+							"offset": 8,
+							"vertices": [ -2.97738, 9.40254, -6.91661, 19.92794, -10.55287, 18.41085, -12.37161, 12.38473, -4.72607, 6.30799, 0, 0, -1.48902, 4.88944, -7.06773, 10.70102 ]
+						},
+						{
+							"time": 0.8333,
+							"offset": 6,
+							"vertices": [ 1.05319, 1.56362, -2.52723, 7.9974, -5.52031, 17.14137, -8.93317, 15.79635, -10.73748, 10.22056, -4.23801, 5.36992, 0, 0, 0, 0, -5.83148, 8.55532 ]
+						},
+						{
+							"time": 1,
+							"offset": 8,
+							"vertices": [ 3.69298, 2.37573, -7.16969, 18.79733, -12.78162, 14.7778, -12.75776, 6.50514, -3.13476, 1.98906, -0.44402, 0.36629, 0, 0, -3.80085, 2.98474 ]
+						}
+					]
+				},
+				"pelvis": {
+					"pelvis": [
+						{},
+						{
+							"time": 0.1333,
+							"offset": 6,
+							"vertices": [ -0.6899, -4.13284 ]
+						},
+						{
+							"time": 0.3333,
+							"offset": 6,
+							"vertices": [ -1.04945, -3.10477 ]
+						},
+						{
+							"time": 0.7,
+							"offset": 6,
+							"vertices": [ -1.4245, -6.30617 ]
+						},
+						{
+							"time": 0.8667,
+							"offset": 6,
+							"vertices": [ -1.13542, -1.79036 ]
+						},
+						{ "time": 1 }
+					]
+				},
+				"undie-straps": {
+					"undie-straps": [
+						{
+							"offset": 2,
+							"vertices": [ -1.77697, 0.5476, -0.96145, -1.03793, -0.39148, -0.24072, -1.77697, 0.5476 ]
+						},
+						{
+							"time": 0.1333,
+							"offset": 2,
+							"vertices": [ -2.25684, -1.03177, -1.49719, -4.23862, -0.7447, -2.84907, -1.90072, 0.54478 ]
+						},
+						{
+							"time": 0.3333,
+							"offset": 2,
+							"vertices": [ -2.37974, -0.05432, -0.49433, 0.19437, -0.90861, 1.16519, -1.60956, 2.70799, 0.96186, 0.80615 ]
+						},
+						{
+							"time": 0.7,
+							"offset": 2,
+							"vertices": [ -0.91715, -2.76567, -0.62215, -3.63489, -0.84941, -2.26772, -2.56077, 0.52971 ]
+						},
+						{
+							"time": 0.8667,
+							"offset": 2,
+							"vertices": [ -2.56077, 0.52971, -1.58065, 0.32031, -1.3847, 0.32476, -2.56077, 0.52971 ]
+						},
+						{
+							"time": 1,
+							"offset": 2,
+							"vertices": [ -1.77697, 0.5476, -0.80128, 0.53413, -0.80128, 0.53413, -1.77697, 0.5476 ]
+						}
+					]
+				}
+			}
+		}
+	}
+}
+}

+ 293 - 0
spine-cocos2dx/example-v4/Resources/common/goblins.atlas

@@ -0,0 +1,293 @@
+
+goblins.png
+size: 1024,128
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+dagger
+  rotate: true
+  xy: 372, 100
+  size: 26, 108
+  orig: 26, 108
+  offset: 0, 0
+  index: -1
+goblin/eyes-closed
+  rotate: false
+  xy: 2, 7
+  size: 34, 12
+  orig: 34, 12
+  offset: 0, 0
+  index: -1
+goblin/head
+  rotate: false
+  xy: 107, 36
+  size: 103, 66
+  orig: 103, 66
+  offset: 0, 0
+  index: -1
+goblin/left-arm
+  rotate: false
+  xy: 901, 56
+  size: 37, 35
+  orig: 37, 35
+  offset: 0, 0
+  index: -1
+goblin/left-foot
+  rotate: false
+  xy: 929, 95
+  size: 65, 31
+  orig: 65, 31
+  offset: 0, 0
+  index: -1
+goblin/left-hand
+  rotate: false
+  xy: 452, 2
+  size: 36, 41
+  orig: 36, 41
+  offset: 0, 0
+  index: -1
+goblin/left-lower-leg
+  rotate: true
+  xy: 713, 93
+  size: 33, 70
+  orig: 33, 70
+  offset: 0, 0
+  index: -1
+goblin/left-shoulder
+  rotate: false
+  xy: 610, 44
+  size: 29, 44
+  orig: 29, 44
+  offset: 0, 0
+  index: -1
+goblin/left-upper-leg
+  rotate: true
+  xy: 638, 93
+  size: 33, 73
+  orig: 33, 73
+  offset: 0, 0
+  index: -1
+goblin/neck
+  rotate: false
+  xy: 490, 2
+  size: 36, 41
+  orig: 36, 41
+  offset: 0, 0
+  index: -1
+goblin/pelvis
+  rotate: false
+  xy: 482, 45
+  size: 62, 43
+  orig: 62, 43
+  offset: 0, 0
+  index: -1
+goblin/right-arm
+  rotate: true
+  xy: 690, 2
+  size: 23, 50
+  orig: 23, 50
+  offset: 0, 0
+  index: -1
+goblin/right-foot
+  rotate: false
+  xy: 771, 58
+  size: 63, 33
+  orig: 63, 33
+  offset: 0, 0
+  index: -1
+goblin/right-hand
+  rotate: false
+  xy: 940, 56
+  size: 36, 37
+  orig: 36, 37
+  offset: 0, 0
+  index: -1
+goblin/right-lower-leg
+  rotate: true
+  xy: 482, 90
+  size: 36, 76
+  orig: 36, 76
+  offset: 0, 0
+  index: -1
+goblin/right-shoulder
+  rotate: true
+  xy: 602, 3
+  size: 39, 45
+  orig: 39, 45
+  offset: 0, 0
+  index: -1
+goblin/right-upper-leg
+  rotate: true
+  xy: 641, 57
+  size: 34, 63
+  orig: 34, 63
+  offset: 0, 0
+  index: -1
+goblin/torso
+  rotate: true
+  xy: 212, 34
+  size: 68, 96
+  orig: 68, 96
+  offset: 0, 0
+  index: -1
+goblin/undie-straps
+  rotate: false
+  xy: 380, 5
+  size: 55, 19
+  orig: 55, 19
+  offset: 0, 0
+  index: -1
+goblin/undies
+  rotate: false
+  xy: 174, 5
+  size: 36, 29
+  orig: 36, 29
+  offset: 0, 0
+  index: -1
+goblingirl/eyes-closed
+  rotate: false
+  xy: 269, 11
+  size: 37, 21
+  orig: 37, 21
+  offset: 0, 0
+  index: -1
+goblingirl/head
+  rotate: false
+  xy: 2, 21
+  size: 103, 81
+  orig: 103, 81
+  offset: 0, 0
+  index: -1
+goblingirl/left-arm
+  rotate: true
+  xy: 978, 56
+  size: 37, 35
+  orig: 37, 35
+  offset: 0, 0
+  index: -1
+goblingirl/left-foot
+  rotate: false
+  xy: 107, 3
+  size: 65, 31
+  orig: 65, 31
+  offset: 0, 0
+  index: -1
+goblingirl/left-hand
+  rotate: false
+  xy: 565, 2
+  size: 35, 40
+  orig: 35, 40
+  offset: 0, 0
+  index: -1
+goblingirl/left-lower-leg
+  rotate: true
+  xy: 785, 93
+  size: 33, 70
+  orig: 33, 70
+  offset: 0, 0
+  index: -1
+goblingirl/left-shoulder
+  rotate: true
+  xy: 690, 27
+  size: 28, 46
+  orig: 28, 46
+  offset: 0, 0
+  index: -1
+goblingirl/left-upper-leg
+  rotate: true
+  xy: 857, 93
+  size: 33, 70
+  orig: 33, 70
+  offset: 0, 0
+  index: -1
+goblingirl/neck
+  rotate: false
+  xy: 528, 2
+  size: 35, 41
+  orig: 35, 41
+  offset: 0, 0
+  index: -1
+goblingirl/pelvis
+  rotate: false
+  xy: 546, 45
+  size: 62, 43
+  orig: 62, 43
+  offset: 0, 0
+  index: -1
+goblingirl/right-arm
+  rotate: false
+  xy: 452, 48
+  size: 28, 50
+  orig: 28, 50
+  offset: 0, 0
+  index: -1
+goblingirl/right-foot
+  rotate: false
+  xy: 836, 58
+  size: 63, 33
+  orig: 63, 33
+  offset: 0, 0
+  index: -1
+goblingirl/right-hand
+  rotate: true
+  xy: 771, 20
+  size: 36, 37
+  orig: 36, 37
+  offset: 0, 0
+  index: -1
+goblingirl/right-lower-leg
+  rotate: true
+  xy: 560, 90
+  size: 36, 76
+  orig: 36, 76
+  offset: 0, 0
+  index: -1
+goblingirl/right-shoulder
+  rotate: false
+  xy: 649, 10
+  size: 39, 45
+  orig: 39, 45
+  offset: 0, 0
+  index: -1
+goblingirl/right-upper-leg
+  rotate: true
+  xy: 706, 57
+  size: 34, 63
+  orig: 34, 63
+  offset: 0, 0
+  index: -1
+goblingirl/torso
+  rotate: false
+  xy: 310, 2
+  size: 68, 96
+  orig: 68, 96
+  offset: 0, 0
+  index: -1
+goblingirl/undie-straps
+  rotate: false
+  xy: 212, 13
+  size: 55, 19
+  orig: 55, 19
+  offset: 0, 0
+  index: -1
+goblingirl/undies
+  rotate: false
+  xy: 810, 27
+  size: 36, 29
+  orig: 36, 29
+  offset: 0, 0
+  index: -1
+shield
+  rotate: false
+  xy: 380, 26
+  size: 70, 72
+  orig: 70, 72
+  offset: 0, 0
+  index: -1
+spear
+  rotate: true
+  xy: 2, 104
+  size: 22, 368
+  orig: 22, 368
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/goblins.png


BIN
spine-cocos2dx/example-v4/Resources/common/mix-and-match-pro.skel


+ 1042 - 0
spine-cocos2dx/example-v4/Resources/common/mix-and-match.atlas

@@ -0,0 +1,1042 @@
+
+mix-and-match.png
+size: 1024,512
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+base-head
+  rotate: false
+  xy: 150, 109
+  size: 95, 73
+  orig: 95, 73
+  offset: 0, 0
+  index: -1
+boy/arm-front
+  rotate: true
+  xy: 113, 279
+  size: 36, 115
+  orig: 36, 115
+  offset: 0, 0
+  index: -1
+boy/backpack
+  rotate: false
+  xy: 249, 357
+  size: 119, 153
+  orig: 119, 153
+  offset: 0, 0
+  index: -1
+boy/backpack-pocket
+  rotate: false
+  xy: 988, 266
+  size: 34, 62
+  orig: 34, 62
+  offset: 0, 0
+  index: -1
+boy/backpack-strap-front
+  rotate: true
+  xy: 725, 241
+  size: 38, 88
+  orig: 38, 88
+  offset: 0, 0
+  index: -1
+boy/backpack-up
+  rotate: true
+  xy: 628, 172
+  size: 21, 70
+  orig: 21, 70
+  offset: 0, 0
+  index: -1
+boy/body
+  rotate: true
+  xy: 845, 413
+  size: 97, 132
+  orig: 97, 132
+  offset: 0, 0
+  index: -1
+boy/boot-ribbon-front
+  rotate: false
+  xy: 1013, 422
+  size: 9, 11
+  orig: 9, 11
+  offset: 0, 0
+  index: -1
+boy/collar
+  rotate: false
+  xy: 789, 282
+  size: 73, 29
+  orig: 73, 29
+  offset: 0, 0
+  index: -1
+boy/ear
+  rotate: false
+  xy: 994, 138
+  size: 19, 23
+  orig: 19, 23
+  offset: 0, 0
+  index: -1
+boy/eye-back-low-eyelid
+  rotate: false
+  xy: 483, 310
+  size: 17, 6
+  orig: 17, 6
+  offset: 0, 0
+  index: -1
+boy/eye-back-pupil
+  rotate: true
+  xy: 960, 266
+  size: 8, 9
+  orig: 8, 9
+  offset: 0, 0
+  index: -1
+boy/eye-back-up-eyelid
+  rotate: false
+  xy: 555, 173
+  size: 23, 5
+  orig: 23, 5
+  offset: 0, 0
+  index: -1
+boy/eye-back-up-eyelid-back
+  rotate: true
+  xy: 546, 151
+  size: 19, 10
+  orig: 19, 10
+  offset: 0, 0
+  index: -1
+boy/eye-front-low-eyelid
+  rotate: true
+  xy: 1015, 151
+  size: 22, 7
+  orig: 22, 7
+  offset: 0, 0
+  index: -1
+boy/eye-front-pupil
+  rotate: false
+  xy: 386, 136
+  size: 9, 9
+  orig: 9, 9
+  offset: 0, 0
+  index: -1
+boy/eye-front-up-eyelid
+  rotate: true
+  xy: 377, 190
+  size: 31, 6
+  orig: 31, 6
+  offset: 0, 0
+  index: -1
+boy/eye-front-up-eyelid-back
+  rotate: true
+  xy: 700, 167
+  size: 26, 9
+  orig: 26, 9
+  offset: 0, 0
+  index: -1
+boy/eye-iris-back
+  rotate: false
+  xy: 578, 154
+  size: 17, 17
+  orig: 17, 17
+  offset: 0, 0
+  index: -1
+boy/eye-iris-front
+  rotate: false
+  xy: 558, 153
+  size: 18, 18
+  orig: 18, 18
+  offset: 0, 0
+  index: -1
+boy/eye-white-back
+  rotate: true
+  xy: 461, 83
+  size: 20, 12
+  orig: 20, 12
+  offset: 0, 0
+  index: -1
+boy/eye-white-front
+  rotate: true
+  xy: 991, 330
+  size: 27, 13
+  orig: 27, 13
+  offset: 0, 0
+  index: -1
+boy/eyebrow-back
+  rotate: false
+  xy: 504, 146
+  size: 20, 11
+  orig: 20, 11
+  offset: 0, 0
+  index: -1
+boy/eyebrow-front
+  rotate: true
+  xy: 471, 122
+  size: 25, 11
+  orig: 25, 11
+  offset: 0, 0
+  index: -1
+boy/hair-back
+  rotate: false
+  xy: 867, 330
+  size: 122, 81
+  orig: 122, 81
+  offset: 0, 0
+  index: -1
+boy/hair-bangs
+  rotate: false
+  xy: 483, 203
+  size: 70, 37
+  orig: 70, 37
+  offset: 0, 0
+  index: -1
+boy/hair-side
+  rotate: true
+  xy: 979, 435
+  size: 25, 43
+  orig: 25, 43
+  offset: 0, 0
+  index: -1
+boy/hand-backfingers
+  rotate: true
+  xy: 711, 168
+  size: 19, 21
+  orig: 19, 21
+  offset: 0, 0
+  index: -1
+boy/hand-front-fingers
+  rotate: true
+  xy: 734, 168
+  size: 19, 21
+  orig: 19, 21
+  offset: 0, 0
+  index: -1
+boy/hat
+  rotate: false
+  xy: 388, 241
+  size: 93, 56
+  orig: 93, 56
+  offset: 0, 0
+  index: -1
+boy/leg-front
+  rotate: false
+  xy: 85, 104
+  size: 31, 158
+  orig: 31, 158
+  offset: 0, 0
+  index: -1
+boy/mouth-close
+  rotate: false
+  xy: 580, 173
+  size: 21, 5
+  orig: 21, 5
+  offset: 0, 0
+  index: -1
+girl-blue-cape/mouth-close
+  rotate: false
+  xy: 580, 173
+  size: 21, 5
+  orig: 21, 5
+  offset: 0, 0
+  index: -1
+girl-spring-dress/mouth-close
+  rotate: false
+  xy: 580, 173
+  size: 21, 5
+  orig: 21, 5
+  offset: 0, 0
+  index: -1
+girl/mouth-close
+  rotate: false
+  xy: 580, 173
+  size: 21, 5
+  orig: 21, 5
+  offset: 0, 0
+  index: -1
+boy/mouth-smile
+  rotate: true
+  xy: 1015, 175
+  size: 29, 7
+  orig: 29, 7
+  offset: 0, 0
+  index: -1
+boy/nose
+  rotate: false
+  xy: 597, 154
+  size: 17, 10
+  orig: 17, 10
+  offset: 0, 0
+  index: -1
+boy/pompom
+  rotate: true
+  xy: 979, 462
+  size: 48, 43
+  orig: 48, 43
+  offset: 0, 0
+  index: -1
+boy/zip
+  rotate: true
+  xy: 780, 171
+  size: 14, 23
+  orig: 14, 23
+  offset: 0, 0
+  index: -1
+girl-blue-cape/back-eyebrow
+  rotate: false
+  xy: 504, 112
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl-blue-cape/body-dress
+  rotate: false
+  xy: 2, 264
+  size: 109, 246
+  orig: 109, 246
+  offset: 0, 0
+  index: -1
+girl-blue-cape/body-ribbon
+  rotate: false
+  xy: 942, 123
+  size: 50, 38
+  orig: 50, 38
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-back
+  rotate: false
+  xy: 113, 317
+  size: 134, 193
+  orig: 134, 193
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-back-up
+  rotate: false
+  xy: 504, 309
+  size: 123, 106
+  orig: 123, 106
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-ribbon
+  rotate: true
+  xy: 526, 151
+  size: 50, 18
+  orig: 50, 18
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-shoulder-back
+  rotate: true
+  xy: 881, 123
+  size: 49, 59
+  orig: 49, 59
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-shoulder-front
+  rotate: false
+  xy: 2, 2
+  size: 62, 76
+  orig: 62, 76
+  offset: 0, 0
+  index: -1
+girl-blue-cape/cape-up-front
+  rotate: true
+  xy: 629, 313
+  size: 98, 117
+  orig: 98, 117
+  offset: 0, 0
+  index: -1
+girl-blue-cape/ear
+  rotate: true
+  xy: 397, 82
+  size: 19, 23
+  orig: 19, 23
+  offset: 0, 0
+  index: -1
+girl-spring-dress/ear
+  rotate: true
+  xy: 397, 82
+  size: 19, 23
+  orig: 19, 23
+  offset: 0, 0
+  index: -1
+girl/ear
+  rotate: true
+  xy: 397, 82
+  size: 19, 23
+  orig: 19, 23
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-back-low-eyelid
+  rotate: true
+  xy: 104, 64
+  size: 17, 6
+  orig: 17, 6
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-back-low-eyelid
+  rotate: true
+  xy: 104, 64
+  size: 17, 6
+  orig: 17, 6
+  offset: 0, 0
+  index: -1
+girl/eye-back-low-eyelid
+  rotate: true
+  xy: 104, 64
+  size: 17, 6
+  orig: 17, 6
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-back-pupil
+  rotate: false
+  xy: 805, 176
+  size: 8, 9
+  orig: 8, 9
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-back-pupil
+  rotate: false
+  xy: 805, 176
+  size: 8, 9
+  orig: 8, 9
+  offset: 0, 0
+  index: -1
+girl/eye-back-pupil
+  rotate: false
+  xy: 805, 176
+  size: 8, 9
+  orig: 8, 9
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-back-up-eyelid
+  rotate: false
+  xy: 118, 105
+  size: 24, 12
+  orig: 24, 12
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-back-up-eyelid
+  rotate: false
+  xy: 118, 105
+  size: 24, 12
+  orig: 24, 12
+  offset: 0, 0
+  index: -1
+girl/eye-back-up-eyelid
+  rotate: false
+  xy: 118, 105
+  size: 24, 12
+  orig: 24, 12
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-back-up-eyelid-back
+  rotate: false
+  xy: 230, 304
+  size: 17, 11
+  orig: 17, 11
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-back-up-eyelid-back
+  rotate: false
+  xy: 230, 304
+  size: 17, 11
+  orig: 17, 11
+  offset: 0, 0
+  index: -1
+girl/eye-back-up-eyelid-back
+  rotate: false
+  xy: 230, 304
+  size: 17, 11
+  orig: 17, 11
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-front-low-eyelid
+  rotate: true
+  xy: 1016, 118
+  size: 18, 6
+  orig: 18, 6
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-front-low-eyelid
+  rotate: true
+  xy: 1016, 118
+  size: 18, 6
+  orig: 18, 6
+  offset: 0, 0
+  index: -1
+girl/eye-front-low-eyelid
+  rotate: true
+  xy: 1016, 118
+  size: 18, 6
+  orig: 18, 6
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-front-pupil
+  rotate: false
+  xy: 471, 111
+  size: 9, 9
+  orig: 9, 9
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-front-pupil
+  rotate: false
+  xy: 471, 111
+  size: 9, 9
+  orig: 9, 9
+  offset: 0, 0
+  index: -1
+girl/eye-front-pupil
+  rotate: false
+  xy: 471, 111
+  size: 9, 9
+  orig: 9, 9
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-front-up-eyelid
+  rotate: true
+  xy: 828, 413
+  size: 30, 14
+  orig: 30, 14
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-front-up-eyelid
+  rotate: true
+  xy: 828, 413
+  size: 30, 14
+  orig: 30, 14
+  offset: 0, 0
+  index: -1
+girl/eye-front-up-eyelid
+  rotate: true
+  xy: 828, 413
+  size: 30, 14
+  orig: 30, 14
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-front-up-eyelid-back
+  rotate: true
+  xy: 947, 206
+  size: 26, 11
+  orig: 26, 11
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-front-up-eyelid-back
+  rotate: true
+  xy: 947, 206
+  size: 26, 11
+  orig: 26, 11
+  offset: 0, 0
+  index: -1
+girl/eye-front-up-eyelid-back
+  rotate: true
+  xy: 947, 206
+  size: 26, 11
+  orig: 26, 11
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-iris-back
+  rotate: false
+  xy: 126, 86
+  size: 17, 17
+  orig: 17, 17
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-iris-front
+  rotate: false
+  xy: 484, 139
+  size: 18, 18
+  orig: 18, 18
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-white-back
+  rotate: true
+  xy: 1006, 337
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-white-back
+  rotate: true
+  xy: 1006, 337
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl-blue-cape/eye-white-front
+  rotate: false
+  xy: 994, 120
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-white-front
+  rotate: false
+  xy: 994, 120
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl/eye-white-front
+  rotate: false
+  xy: 994, 120
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl-blue-cape/front-eyebrow
+  rotate: false
+  xy: 183, 95
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hair-back
+  rotate: false
+  xy: 748, 313
+  size: 117, 98
+  orig: 117, 98
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hair-bangs
+  rotate: false
+  xy: 388, 199
+  size: 91, 40
+  orig: 91, 40
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hair-head-side-back
+  rotate: false
+  xy: 783, 187
+  size: 30, 52
+  orig: 30, 52
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hair-head-side-front
+  rotate: false
+  xy: 483, 159
+  size: 41, 42
+  orig: 41, 42
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hair-side
+  rotate: false
+  xy: 66, 7
+  size: 36, 71
+  orig: 36, 71
+  offset: 0, 0
+  index: -1
+girl-blue-cape/hand-front-fingers
+  rotate: true
+  xy: 757, 168
+  size: 19, 21
+  orig: 19, 21
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hand-front-fingers
+  rotate: true
+  xy: 757, 168
+  size: 19, 21
+  orig: 19, 21
+  offset: 0, 0
+  index: -1
+girl-blue-cape/leg-front
+  rotate: true
+  xy: 668, 413
+  size: 30, 158
+  orig: 30, 158
+  offset: 0, 0
+  index: -1
+girl-blue-cape/mouth-smile
+  rotate: true
+  xy: 546, 172
+  size: 29, 7
+  orig: 29, 7
+  offset: 0, 0
+  index: -1
+girl-spring-dress/mouth-smile
+  rotate: true
+  xy: 546, 172
+  size: 29, 7
+  orig: 29, 7
+  offset: 0, 0
+  index: -1
+girl/mouth-smile
+  rotate: true
+  xy: 546, 172
+  size: 29, 7
+  orig: 29, 7
+  offset: 0, 0
+  index: -1
+girl-blue-cape/nose
+  rotate: true
+  xy: 1015, 138
+  size: 11, 7
+  orig: 11, 7
+  offset: 0, 0
+  index: -1
+girl-spring-dress/nose
+  rotate: true
+  xy: 1015, 138
+  size: 11, 7
+  orig: 11, 7
+  offset: 0, 0
+  index: -1
+girl/nose
+  rotate: true
+  xy: 1015, 138
+  size: 11, 7
+  orig: 11, 7
+  offset: 0, 0
+  index: -1
+girl-blue-cape/sleeve-back
+  rotate: true
+  xy: 440, 105
+  size: 42, 29
+  orig: 42, 29
+  offset: 0, 0
+  index: -1
+girl-blue-cape/sleeve-front
+  rotate: true
+  xy: 867, 276
+  size: 52, 119
+  orig: 52, 119
+  offset: 0, 0
+  index: -1
+girl-spring-dress/arm-front
+  rotate: true
+  xy: 370, 299
+  size: 17, 111
+  orig: 17, 111
+  offset: 0, 0
+  index: -1
+girl-spring-dress/back-eyebrow
+  rotate: false
+  xy: 603, 166
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl-spring-dress/body-up
+  rotate: false
+  xy: 815, 163
+  size: 64, 66
+  orig: 64, 66
+  offset: 0, 0
+  index: -1
+girl-spring-dress/cloak-down
+  rotate: false
+  xy: 386, 147
+  size: 50, 50
+  orig: 50, 50
+  offset: 0, 0
+  index: -1
+girl-spring-dress/cloak-up
+  rotate: false
+  xy: 881, 174
+  size: 64, 58
+  orig: 64, 58
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-iris-back
+  rotate: false
+  xy: 145, 90
+  size: 17, 17
+  orig: 17, 17
+  offset: 0, 0
+  index: -1
+girl-spring-dress/eye-iris-front
+  rotate: false
+  xy: 484, 119
+  size: 18, 18
+  orig: 18, 18
+  offset: 0, 0
+  index: -1
+girl-spring-dress/front-eyebrow
+  rotate: false
+  xy: 203, 95
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hair-back
+  rotate: false
+  xy: 370, 417
+  size: 147, 93
+  orig: 147, 93
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hair-bangs
+  rotate: false
+  xy: 247, 83
+  size: 91, 40
+  orig: 91, 40
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hair-head-side-back
+  rotate: false
+  xy: 991, 359
+  size: 30, 52
+  orig: 30, 52
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hair-head-side-front
+  rotate: false
+  xy: 354, 87
+  size: 41, 42
+  orig: 41, 42
+  offset: 0, 0
+  index: -1
+girl-spring-dress/hair-side
+  rotate: true
+  xy: 555, 218
+  size: 36, 71
+  orig: 36, 71
+  offset: 0, 0
+  index: -1
+girl-spring-dress/leg-front
+  rotate: true
+  xy: 629, 281
+  size: 30, 158
+  orig: 30, 158
+  offset: 0, 0
+  index: -1
+girl-spring-dress/neck
+  rotate: true
+  xy: 979, 413
+  size: 20, 32
+  orig: 20, 32
+  offset: 0, 0
+  index: -1
+girl-spring-dress/shoulder-ribbon
+  rotate: true
+  xy: 351, 185
+  size: 36, 24
+  orig: 36, 24
+  offset: 0, 0
+  index: -1
+girl-spring-dress/skirt
+  rotate: true
+  xy: 2, 80
+  size: 182, 81
+  orig: 182, 81
+  offset: 0, 0
+  index: -1
+girl-spring-dress/underskirt
+  rotate: false
+  xy: 668, 445
+  size: 175, 65
+  orig: 175, 65
+  offset: 0, 0
+  index: -1
+girl/arm-front
+  rotate: true
+  xy: 234, 185
+  size: 36, 115
+  orig: 36, 115
+  offset: 0, 0
+  index: -1
+girl/back-eyebrow
+  rotate: true
+  xy: 112, 84
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl/bag-base
+  rotate: false
+  xy: 960, 206
+  size: 62, 58
+  orig: 62, 58
+  offset: 0, 0
+  index: -1
+girl/bag-strap-front
+  rotate: false
+  xy: 340, 87
+  size: 12, 96
+  orig: 12, 96
+  offset: 0, 0
+  index: -1
+girl/bag-top
+  rotate: true
+  xy: 815, 231
+  size: 49, 50
+  orig: 49, 50
+  offset: 0, 0
+  index: -1
+girl/body
+  rotate: true
+  xy: 370, 318
+  size: 97, 132
+  orig: 97, 132
+  offset: 0, 0
+  index: -1
+girl/boot-ribbon-front
+  rotate: false
+  xy: 112, 69
+  size: 13, 13
+  orig: 13, 13
+  offset: 0, 0
+  index: -1
+girl/eye-iris-back
+  rotate: false
+  xy: 164, 90
+  size: 17, 17
+  orig: 17, 17
+  offset: 0, 0
+  index: -1
+girl/eye-iris-front
+  rotate: false
+  xy: 504, 126
+  size: 18, 18
+  orig: 18, 18
+  offset: 0, 0
+  index: -1
+girl/eye-white-back
+  rotate: true
+  xy: 422, 81
+  size: 20, 16
+  orig: 20, 16
+  offset: 0, 0
+  index: -1
+girl/front-eyebrow
+  rotate: false
+  xy: 223, 95
+  size: 18, 12
+  orig: 18, 12
+  offset: 0, 0
+  index: -1
+girl/hair-back
+  rotate: false
+  xy: 519, 417
+  size: 147, 93
+  orig: 147, 93
+  offset: 0, 0
+  index: -1
+girl/hair-bangs
+  rotate: false
+  xy: 867, 234
+  size: 91, 40
+  orig: 91, 40
+  offset: 0, 0
+  index: -1
+girl/hair-flap-down-front
+  rotate: false
+  xy: 483, 242
+  size: 70, 65
+  orig: 70, 65
+  offset: 0, 0
+  index: -1
+girl/hair-head-side-back
+  rotate: false
+  xy: 354, 131
+  size: 30, 52
+  orig: 30, 52
+  offset: 0, 0
+  index: -1
+girl/hair-head-side-front
+  rotate: false
+  xy: 397, 103
+  size: 41, 42
+  orig: 41, 42
+  offset: 0, 0
+  index: -1
+girl/hair-patch
+  rotate: false
+  xy: 947, 163
+  size: 66, 41
+  orig: 66, 41
+  offset: 0, 0
+  index: -1
+girl/hair-side
+  rotate: true
+  xy: 555, 180
+  size: 36, 71
+  orig: 36, 71
+  offset: 0, 0
+  index: -1
+girl/hair-strand-back-1
+  rotate: false
+  xy: 328, 223
+  size: 58, 74
+  orig: 58, 74
+  offset: 0, 0
+  index: -1
+girl/hair-strand-back-2
+  rotate: false
+  xy: 247, 125
+  size: 91, 58
+  orig: 91, 58
+  offset: 0, 0
+  index: -1
+girl/hair-strand-back-3
+  rotate: false
+  xy: 234, 223
+  size: 92, 79
+  orig: 92, 79
+  offset: 0, 0
+  index: -1
+girl/hair-strand-front-1
+  rotate: true
+  xy: 629, 241
+  size: 38, 94
+  orig: 38, 94
+  offset: 0, 0
+  index: -1
+girl/hair-strand-front-2
+  rotate: false
+  xy: 711, 189
+  size: 70, 50
+  orig: 70, 50
+  offset: 0, 0
+  index: -1
+girl/hair-strand-front-3
+  rotate: true
+  xy: 628, 195
+  size: 44, 81
+  orig: 44, 81
+  offset: 0, 0
+  index: -1
+girl/hand-front-fingers
+  rotate: false
+  xy: 440, 82
+  size: 19, 21
+  orig: 19, 21
+  offset: 0, 0
+  index: -1
+girl/hat
+  rotate: true
+  xy: 150, 184
+  size: 93, 82
+  orig: 93, 82
+  offset: 0, 0
+  index: -1
+girl/leg-front
+  rotate: false
+  xy: 118, 119
+  size: 30, 158
+  orig: 30, 158
+  offset: 0, 0
+  index: -1
+girl/pompom
+  rotate: true
+  xy: 438, 149
+  size: 48, 43
+  orig: 48, 43
+  offset: 0, 0
+  index: -1
+girl/scarf
+  rotate: false
+  xy: 249, 304
+  size: 119, 51
+  orig: 119, 51
+  offset: 0, 0
+  index: -1
+girl/scarf-back
+  rotate: false
+  xy: 555, 256
+  size: 72, 51
+  orig: 72, 51
+  offset: 0, 0
+  index: -1
+girl/zip
+  rotate: true
+  xy: 85, 83
+  size: 19, 25
+  orig: 19, 25
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/mix-and-match.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 687 - 0
spine-cocos2dx/example-v4/Resources/common/raptor-pro.json


+ 272 - 0
spine-cocos2dx/example-v4/Resources/common/raptor.atlas

@@ -0,0 +1,272 @@
+
+raptor.png
+size: 1024,512
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+back-arm
+  rotate: false
+  xy: 895, 295
+  size: 46, 25
+  orig: 46, 25
+  offset: 0, 0
+  index: -1
+back-bracer
+  rotate: true
+  xy: 992, 216
+  size: 39, 28
+  orig: 39, 28
+  offset: 0, 0
+  index: -1
+back-hand
+  rotate: false
+  xy: 594, 58
+  size: 36, 34
+  orig: 36, 34
+  offset: 0, 0
+  index: -1
+back-knee
+  rotate: true
+  xy: 729, 86
+  size: 49, 67
+  orig: 49, 67
+  offset: 0, 0
+  index: -1
+back-thigh
+  rotate: false
+  xy: 379, 2
+  size: 39, 24
+  orig: 39, 24
+  offset: 0, 0
+  index: -1
+eyes-open
+  rotate: true
+  xy: 902, 194
+  size: 47, 45
+  orig: 47, 45
+  offset: 0, 0
+  index: -1
+front-arm
+  rotate: false
+  xy: 945, 306
+  size: 48, 26
+  orig: 48, 26
+  offset: 0, 0
+  index: -1
+front-bracer
+  rotate: false
+  xy: 949, 197
+  size: 41, 29
+  orig: 41, 29
+  offset: 0, 0
+  index: -1
+front-hand
+  rotate: false
+  xy: 949, 266
+  size: 41, 38
+  orig: 41, 38
+  offset: 0, 0
+  index: -1
+front-open-hand
+  rotate: false
+  xy: 875, 148
+  size: 43, 44
+  orig: 43, 44
+  offset: 0, 0
+  index: -1
+front-thigh
+  rotate: true
+  xy: 793, 171
+  size: 57, 29
+  orig: 57, 29
+  offset: 0, 0
+  index: -1
+gun
+  rotate: true
+  xy: 379, 28
+  size: 107, 103
+  orig: 107, 103
+  offset: 0, 0
+  index: -1
+gun-nohand
+  rotate: false
+  xy: 487, 87
+  size: 105, 102
+  orig: 105, 102
+  offset: 0, 0
+  index: -1
+head
+  rotate: false
+  xy: 807, 361
+  size: 136, 149
+  orig: 136, 149
+  offset: 0, 0
+  index: -1
+lower-leg
+  rotate: false
+  xy: 827, 195
+  size: 73, 98
+  orig: 73, 98
+  offset: 0, 0
+  index: -1
+mouth-grind
+  rotate: true
+  xy: 920, 145
+  size: 47, 30
+  orig: 47, 30
+  offset: 0, 0
+  index: -1
+mouth-smile
+  rotate: true
+  xy: 992, 257
+  size: 47, 30
+  orig: 47, 30
+  offset: 0, 0
+  index: -1
+neck
+  rotate: false
+  xy: 359, 114
+  size: 18, 21
+  orig: 18, 21
+  offset: 0, 0
+  index: -1
+raptor-back-arm
+  rotate: false
+  xy: 653, 142
+  size: 82, 86
+  orig: 82, 86
+  offset: 0, 0
+  index: -1
+raptor-body
+  rotate: false
+  xy: 2, 277
+  size: 632, 233
+  orig: 632, 233
+  offset: 0, 0
+  index: -1
+raptor-front-arm
+  rotate: true
+  xy: 484, 4
+  size: 81, 102
+  orig: 81, 102
+  offset: 0, 0
+  index: -1
+raptor-front-leg
+  rotate: false
+  xy: 2, 18
+  size: 191, 257
+  orig: 191, 257
+  offset: 0, 0
+  index: -1
+raptor-hindleg-back
+  rotate: false
+  xy: 636, 295
+  size: 169, 215
+  orig: 169, 215
+  offset: 0, 0
+  index: -1
+raptor-horn
+  rotate: false
+  xy: 195, 22
+  size: 182, 80
+  orig: 182, 80
+  offset: 0, 0
+  index: -1
+raptor-horn-back
+  rotate: true
+  xy: 945, 334
+  size: 176, 77
+  orig: 176, 77
+  offset: 0, 0
+  index: -1
+raptor-jaw
+  rotate: false
+  xy: 359, 137
+  size: 126, 138
+  orig: 126, 138
+  offset: 0, 0
+  index: -1
+raptor-jaw-tooth
+  rotate: true
+  xy: 895, 322
+  size: 37, 48
+  orig: 37, 48
+  offset: 0, 0
+  index: -1
+raptor-mouth-inside
+  rotate: true
+  xy: 949, 228
+  size: 36, 41
+  orig: 36, 41
+  offset: 0, 0
+  index: -1
+raptor-saddle-strap-back
+  rotate: true
+  xy: 653, 86
+  size: 54, 74
+  orig: 54, 74
+  offset: 0, 0
+  index: -1
+raptor-saddle-strap-front
+  rotate: false
+  xy: 594, 94
+  size: 57, 95
+  orig: 57, 95
+  offset: 0, 0
+  index: -1
+raptor-saddle-w-shadow
+  rotate: false
+  xy: 195, 104
+  size: 162, 171
+  orig: 162, 171
+  offset: 0, 0
+  index: -1
+raptor-tail-shadow
+  rotate: false
+  xy: 636, 230
+  size: 189, 63
+  orig: 189, 63
+  offset: 0, 0
+  index: -1
+raptor-tongue
+  rotate: false
+  xy: 807, 295
+  size: 86, 64
+  orig: 86, 64
+  offset: 0, 0
+  index: -1
+stirrup-back
+  rotate: true
+  xy: 952, 151
+  size: 44, 35
+  orig: 44, 35
+  offset: 0, 0
+  index: -1
+stirrup-front
+  rotate: false
+  xy: 902, 243
+  size: 45, 50
+  orig: 45, 50
+  offset: 0, 0
+  index: -1
+stirrup-strap
+  rotate: false
+  xy: 824, 147
+  size: 49, 46
+  orig: 49, 46
+  offset: 0, 0
+  index: -1
+torso
+  rotate: false
+  xy: 737, 137
+  size: 54, 91
+  orig: 54, 91
+  offset: 0, 0
+  index: -1
+visor
+  rotate: false
+  xy: 487, 191
+  size: 131, 84
+  orig: 131, 84
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/raptor.png


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 478 - 0
spine-cocos2dx/example-v4/Resources/common/spineboy-pro.json


+ 286 - 0
spine-cocos2dx/example-v4/Resources/common/spineboy.atlas

@@ -0,0 +1,286 @@
+
+spineboy.png
+size: 1024,256
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+crosshair
+  rotate: false
+  xy: 352, 7
+  size: 45, 45
+  orig: 45, 45
+  offset: 0, 0
+  index: -1
+eye-indifferent
+  rotate: false
+  xy: 862, 105
+  size: 47, 45
+  orig: 47, 45
+  offset: 0, 0
+  index: -1
+eye-surprised
+  rotate: false
+  xy: 505, 79
+  size: 47, 45
+  orig: 47, 45
+  offset: 0, 0
+  index: -1
+front-bracer
+  rotate: false
+  xy: 826, 66
+  size: 29, 40
+  orig: 29, 40
+  offset: 0, 0
+  index: -1
+front-fist-closed
+  rotate: false
+  xy: 786, 65
+  size: 38, 41
+  orig: 38, 41
+  offset: 0, 0
+  index: -1
+front-fist-open
+  rotate: true
+  xy: 710, 51
+  size: 43, 44
+  orig: 43, 44
+  offset: 0, 0
+  index: -1
+front-foot
+  rotate: false
+  xy: 210, 6
+  size: 63, 35
+  orig: 63, 35
+  offset: 0, 0
+  index: -1
+front-shin
+  rotate: true
+  xy: 665, 128
+  size: 41, 92
+  orig: 41, 92
+  offset: 0, 0
+  index: -1
+front-thigh
+  rotate: true
+  xy: 2, 2
+  size: 23, 56
+  orig: 23, 56
+  offset: 0, 0
+  index: -1
+front-upper-arm
+  rotate: false
+  xy: 250, 205
+  size: 23, 49
+  orig: 23, 49
+  offset: 0, 0
+  index: -1
+goggles
+  rotate: false
+  xy: 665, 171
+  size: 131, 83
+  orig: 131, 83
+  offset: 0, 0
+  index: -1
+gun
+  rotate: false
+  xy: 798, 152
+  size: 105, 102
+  orig: 105, 102
+  offset: 0, 0
+  index: -1
+head
+  rotate: false
+  xy: 2, 27
+  size: 136, 149
+  orig: 136, 149
+  offset: 0, 0
+  index: -1
+hoverboard-board
+  rotate: false
+  xy: 2, 178
+  size: 246, 76
+  orig: 246, 76
+  offset: 0, 0
+  index: -1
+hoverboard-thruster
+  rotate: true
+  xy: 722, 96
+  size: 30, 32
+  orig: 30, 32
+  offset: 0, 0
+  index: -1
+hoverglow-small
+  rotate: false
+  xy: 275, 81
+  size: 137, 38
+  orig: 137, 38
+  offset: 0, 0
+  index: -1
+mouth-grind
+  rotate: false
+  xy: 614, 97
+  size: 47, 30
+  orig: 47, 30
+  offset: 0, 0
+  index: -1
+mouth-oooo
+  rotate: false
+  xy: 612, 65
+  size: 47, 30
+  orig: 47, 30
+  offset: 0, 0
+  index: -1
+mouth-smile
+  rotate: false
+  xy: 661, 64
+  size: 47, 30
+  orig: 47, 30
+  offset: 0, 0
+  index: -1
+muzzle-glow
+  rotate: false
+  xy: 382, 54
+  size: 25, 25
+  orig: 25, 25
+  offset: 0, 0
+  index: -1
+muzzle-ring
+  rotate: true
+  xy: 275, 54
+  size: 25, 105
+  orig: 25, 105
+  offset: 0, 0
+  index: -1
+muzzle01
+  rotate: true
+  xy: 911, 95
+  size: 67, 40
+  orig: 67, 40
+  offset: 0, 0
+  index: -1
+muzzle02
+  rotate: false
+  xy: 792, 108
+  size: 68, 42
+  orig: 68, 42
+  offset: 0, 0
+  index: -1
+muzzle03
+  rotate: true
+  xy: 956, 171
+  size: 83, 53
+  orig: 83, 53
+  offset: 0, 0
+  index: -1
+muzzle04
+  rotate: false
+  xy: 275, 7
+  size: 75, 45
+  orig: 75, 45
+  offset: 0, 0
+  index: -1
+muzzle05
+  rotate: false
+  xy: 140, 3
+  size: 68, 38
+  orig: 68, 38
+  offset: 0, 0
+  index: -1
+neck
+  rotate: false
+  xy: 250, 182
+  size: 18, 21
+  orig: 18, 21
+  offset: 0, 0
+  index: -1
+portal-bg
+  rotate: false
+  xy: 140, 43
+  size: 133, 133
+  orig: 133, 133
+  offset: 0, 0
+  index: -1
+portal-flare1
+  rotate: false
+  xy: 554, 65
+  size: 56, 30
+  orig: 56, 30
+  offset: 0, 0
+  index: -1
+portal-flare2
+  rotate: true
+  xy: 759, 112
+  size: 57, 31
+  orig: 57, 31
+  offset: 0, 0
+  index: -1
+portal-flare3
+  rotate: false
+  xy: 554, 97
+  size: 58, 30
+  orig: 58, 30
+  offset: 0, 0
+  index: -1
+portal-shade
+  rotate: false
+  xy: 275, 121
+  size: 133, 133
+  orig: 133, 133
+  offset: 0, 0
+  index: -1
+portal-streaks1
+  rotate: false
+  xy: 410, 126
+  size: 126, 128
+  orig: 126, 128
+  offset: 0, 0
+  index: -1
+portal-streaks2
+  rotate: false
+  xy: 538, 129
+  size: 125, 125
+  orig: 125, 125
+  offset: 0, 0
+  index: -1
+rear-bracer
+  rotate: false
+  xy: 857, 67
+  size: 28, 36
+  orig: 28, 36
+  offset: 0, 0
+  index: -1
+rear-foot
+  rotate: false
+  xy: 663, 96
+  size: 57, 30
+  orig: 57, 30
+  offset: 0, 0
+  index: -1
+rear-shin
+  rotate: true
+  xy: 414, 86
+  size: 38, 89
+  orig: 38, 89
+  offset: 0, 0
+  index: -1
+rear-thigh
+  rotate: false
+  xy: 756, 63
+  size: 28, 47
+  orig: 28, 47
+  offset: 0, 0
+  index: -1
+rear-upper-arm
+  rotate: true
+  xy: 60, 5
+  size: 20, 44
+  orig: 20, 44
+  offset: 0, 0
+  index: -1
+torso
+  rotate: false
+  xy: 905, 164
+  size: 49, 90
+  orig: 49, 90
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/spineboy.png


BIN
spine-cocos2dx/example-v4/Resources/common/tank-pro.skel


+ 174 - 0
spine-cocos2dx/example-v4/Resources/common/tank.atlas

@@ -0,0 +1,174 @@
+
+tank.png
+size: 1024,1024
+format: RGBA8888
+filter: Linear,Linear
+repeat: none
+antenna
+  rotate: true
+  xy: 650, 857
+  size: 11, 152
+  orig: 11, 152
+  offset: 0, 0
+  index: -1
+cannon
+  rotate: true
+  xy: 434, 376
+  size: 466, 29
+  orig: 466, 29
+  offset: 0, 0
+  index: -1
+cannon-connector
+  rotate: true
+  xy: 349, 241
+  size: 56, 68
+  orig: 56, 68
+  offset: 0, 0
+  index: -1
+ground
+  rotate: true
+  xy: 255, 330
+  size: 512, 177
+  orig: 512, 177
+  offset: 0, 0
+  index: -1
+guntower
+  rotate: false
+  xy: 650, 870
+  size: 365, 145
+  orig: 365, 145
+  offset: 0, 0
+  index: -1
+machinegun
+  rotate: false
+  xy: 255, 299
+  size: 166, 29
+  orig: 166, 29
+  offset: 0, 0
+  index: -1
+machinegun-mount
+  rotate: true
+  xy: 2, 2
+  size: 36, 48
+  orig: 36, 48
+  offset: 0, 0
+  index: -1
+rock
+  rotate: true
+  xy: 465, 552
+  size: 290, 64
+  orig: 290, 64
+  offset: 0, 0
+  index: -1
+smoke-glow
+  rotate: false
+  xy: 531, 563
+  size: 50, 50
+  orig: 50, 50
+  offset: 0, 0
+  index: -1
+smoke-puff01-bg
+  rotate: true
+  xy: 465, 458
+  size: 92, 62
+  orig: 92, 62
+  offset: 0, 0
+  index: -1
+smoke-puff01-fg
+  rotate: false
+  xy: 115, 138
+  size: 88, 59
+  orig: 88, 59
+  offset: 0, 0
+  index: -1
+smoke-puff02-fg
+  rotate: false
+  xy: 255, 235
+  size: 92, 62
+  orig: 92, 62
+  offset: 0, 0
+  index: -1
+smoke-puff03-fg
+  rotate: false
+  xy: 531, 685
+  size: 92, 62
+  orig: 92, 62
+  offset: 0, 0
+  index: -1
+smoke-puff04-fg
+  rotate: true
+  xy: 465, 378
+  size: 78, 48
+  orig: 78, 48
+  offset: 0, 0
+  index: -1
+tank-bottom
+  rotate: true
+  xy: 115, 199
+  size: 643, 138
+  orig: 643, 138
+  offset: 0, 0
+  index: -1
+tank-bottom-shadow
+  rotate: false
+  xy: 2, 844
+  size: 646, 171
+  orig: 646, 171
+  offset: 0, 0
+  index: -1
+tank-top
+  rotate: true
+  xy: 2, 138
+  size: 704, 111
+  orig: 704, 111
+  offset: 0, 0
+  index: -1
+tread
+  rotate: true
+  xy: 626, 794
+  size: 48, 15
+  orig: 48, 15
+  offset: 0, 0
+  index: -1
+tread-inside
+  rotate: false
+  xy: 434, 360
+  size: 13, 14
+  orig: 13, 14
+  offset: 0, 0
+  index: -1
+wheel-big
+  rotate: false
+  xy: 2, 40
+  size: 96, 96
+  orig: 96, 96
+  offset: 0, 0
+  index: -1
+wheel-big-overlay
+  rotate: false
+  xy: 531, 749
+  size: 93, 93
+  orig: 93, 93
+  offset: 0, 0
+  index: -1
+wheel-mid
+  rotate: false
+  xy: 100, 68
+  size: 68, 68
+  orig: 68, 68
+  offset: 0, 0
+  index: -1
+wheel-mid-overlay
+  rotate: false
+  xy: 531, 615
+  size: 68, 68
+  orig: 68, 68
+  offset: 0, 0
+  index: -1
+wheel-small
+  rotate: false
+  xy: 205, 161
+  size: 36, 36
+  orig: 36, 36
+  offset: 0, 0
+  index: -1

BIN
spine-cocos2dx/example-v4/Resources/common/tank.png


+ 8 - 0
spine-cocos2dx/example-v4/proj.android/.gitignore

@@ -0,0 +1,8 @@
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+/.externalNativeBuild

+ 2 - 0
spine-cocos2dx/example-v4/proj.android/app/.gitignore

@@ -0,0 +1,2 @@
+/build
+/.externalNativeBuild

+ 35 - 0
spine-cocos2dx/example-v4/proj.android/app/AndroidManifest.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.esotericsoftware.spine"
+    android:installLocation="auto">
+
+    <uses-permission android:name="android.permission.INTERNET"/>
+    
+    <uses-feature android:glEsVersion="0x00020000" />
+    
+    <application
+        android:label="@string/app_name"
+        android:allowBackup="true"
+        android:icon="@mipmap/ic_launcher">
+        
+        <!-- Tell Cocos2dxActivity the name of our .so -->
+        <meta-data android:name="android.app.lib_name"
+                   android:value="MyGame" />
+
+        <activity
+            android:name="org.cocos2dx.cpp.AppActivity"
+            android:screenOrientation="landscape"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:label="@string/app_name"
+            android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+            android:launchMode="singleTask"
+            android:taskAffinity=""  >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>

+ 97 - 0
spine-cocos2dx/example-v4/proj.android/app/build.gradle

@@ -0,0 +1,97 @@
+import org.gradle.internal.os.OperatingSystem
+
+apply plugin: 'com.android.application'
+
+android {
+    compileSdkVersion PROP_COMPILE_SDK_VERSION.toInteger()
+
+    defaultConfig {
+        applicationId "com.esotericsoftware.spine"
+        minSdkVersion PROP_MIN_SDK_VERSION
+        targetSdkVersion PROP_TARGET_SDK_VERSION
+        versionCode 1
+        versionName "1.0"
+
+        externalNativeBuild {
+            cmake {
+                targets 'MyGame'
+                arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE"
+                cppFlags "-frtti -fexceptions -fsigned-char"
+            }
+        }
+
+        ndk {
+            abiFilters = []
+            abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
+        }
+    }
+
+    sourceSets.main {
+        java.srcDir "src"
+        res.srcDir "res"
+        manifest.srcFile "AndroidManifest.xml"
+        assets.srcDir "../../Resources"
+    }
+
+    externalNativeBuild {
+        cmake {
+            path "../../CMakeLists.txt"
+        }
+    }
+
+    signingConfigs {
+
+       release {
+            if (project.hasProperty("RELEASE_STORE_FILE")) {
+                storeFile file(RELEASE_STORE_FILE)
+                storePassword RELEASE_STORE_PASSWORD
+                keyAlias RELEASE_KEY_ALIAS
+                keyPassword RELEASE_KEY_PASSWORD
+            }
+        }
+    }
+
+    buildTypes {
+        release {
+            debuggable false
+            jniDebuggable false
+            renderscriptDebuggable false
+            minifyEnabled true
+            shrinkResources true
+            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+            if (project.hasProperty("RELEASE_STORE_FILE")) {
+                signingConfig signingConfigs.release
+            }
+        }
+
+        debug {
+            debuggable true
+            jniDebuggable true
+            renderscriptDebuggable true
+        }
+    }
+}
+
+android.applicationVariants.all { variant ->
+    def project_root_folder = "${projectDir}/../.."
+    def dest_assets_folder = "${projectDir}/assets"
+
+    // delete previous files first
+    delete dest_assets_folder
+    def targetName = variant.name.capitalize()
+    def copyTaskName = "copy${targetName}ResourcesToAssets"
+    
+    tasks.register(copyTaskName) {
+        copy {
+            from "${buildDir}/../../../Resources"
+            into "${buildDir}/intermediates/assets/${variant.dirName}"
+            exclude "**/*.gz"
+        }
+    }
+    tasks.getByName("pre${targetName}Build").dependsOn copyTaskName
+}
+
+dependencies {
+    implementation fileTree(dir: 'libs', include: ['*.jar'])
+    implementation project(':libcocos2dx')
+}

+ 42 - 0
spine-cocos2dx/example-v4/proj.android/app/jni/hellocpp/main.cpp

@@ -0,0 +1,42 @@
+/****************************************************************************
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#include <memory>
+
+#include <android/log.h>
+#include <jni.h>
+
+#include "AppDelegate.h"
+
+#define  LOG_TAG    "main"
+#define  LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
+
+namespace {
+std::unique_ptr<AppDelegate> appDelegate;
+}
+
+void cocos_android_app_init(JNIEnv* env) {
+    LOGD("cocos_android_app_init");
+    appDelegate.reset(new AppDelegate());
+}

+ 37 - 0
spine-cocos2dx/example-v4/proj.android/app/proguard-rules.pro

@@ -0,0 +1,37 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in E:\developSoftware\Android\SDK/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
+
+# Proguard Cocos2d-x for release
+-keep public class org.cocos2dx.** { *; }
+-dontwarn org.cocos2dx.**
+-keep public class com.chukong.** { *; }
+-dontwarn com.chukong.**
+-keep public class com.huawei.android.** { *; }
+-dontwarn com.huawei.android.**
+
+# Proguard Apache HTTP for release
+-keep class org.apache.http.** { *; }
+-dontwarn org.apache.http.**
+
+# Proguard Android Webivew for release. uncomment if you are using a webview in cocos2d-x
+#-keep public class android.net.http.SslError
+#-keep public class android.webkit.WebViewClient
+
+#-dontwarn android.webkit.WebView
+#-dontwarn android.net.http.SslError
+#-dontwarn android.webkit.WebViewClient

BIN
spine-cocos2dx/example-v4/proj.android/app/res/mipmap-hdpi/ic_launcher.png


BIN
spine-cocos2dx/example-v4/proj.android/app/res/mipmap-mdpi/ic_launcher.png


BIN
spine-cocos2dx/example-v4/proj.android/app/res/mipmap-xhdpi/ic_launcher.png


BIN
spine-cocos2dx/example-v4/proj.android/app/res/mipmap-xxhdpi/ic_launcher.png


+ 3 - 0
spine-cocos2dx/example-v4/proj.android/app/res/values/strings.xml

@@ -0,0 +1,3 @@
+<resources>
+    <string name="app_name">spine-cocos2dx-example</string>
+</resources>

+ 58 - 0
spine-cocos2dx/example-v4/proj.android/app/src/org/cocos2dx/cpp/AppActivity.java

@@ -0,0 +1,58 @@
+/****************************************************************************
+Copyright (c) 2015-2016 Chukong Technologies Inc.
+Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+http://www.cocos2d-x.org
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+****************************************************************************/
+package org.cocos2dx.cpp;
+
+import android.os.Bundle;
+import org.cocos2dx.lib.Cocos2dxActivity;
+import android.os.Build;
+import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
+
+public class AppActivity extends Cocos2dxActivity {
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.setEnableVirtualButton(false);
+        super.onCreate(savedInstanceState);
+        // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508
+        if (!isTaskRoot()) {
+            // Android launched another instance of the root activity into an existing task
+            //  so just quietly finish and go away, dropping the user back into the activity
+            //  at the top of the stack (ie: the last state of this task)
+            // Don't need to finish it again since it's finished in super.onCreate .
+            return;
+        }
+        // Make sure we're running on Pie or higher to change cutout mode
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+            // Enable rendering into the cutout area
+            WindowManager.LayoutParams lp = getWindow().getAttributes();
+            lp.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
+            getWindow().setAttributes(lp);
+        }
+        // DO OTHER INITIALIZATION BELOW
+        
+    }
+
+}

+ 26 - 0
spine-cocos2dx/example-v4/proj.android/build.gradle

@@ -0,0 +1,26 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+    repositories {
+        google()
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.1.0'
+
+        // NOTE: Do not place your application dependencies here; they belong
+        // in the individual module build.gradle files
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 42 - 0
spine-cocos2dx/example-v4/proj.android/gradle.properties

@@ -0,0 +1,42 @@
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+# Android SDK version that will be used as the compile project
+PROP_COMPILE_SDK_VERSION=28
+
+# Android SDK version that will be used as the earliest version of android this application can run on
+PROP_MIN_SDK_VERSION=16
+
+# Android SDK version that will be used as the latest version of android this application has been tested on
+PROP_TARGET_SDK_VERSION=28
+
+
+# List of CPU Archtexture to build that application with
+# Available architextures (armeabi-v7a | arm64-v8a | x86)
+# To build for multiple architexture, use the `:` between them
+# Example - PROP_APP_ABI=armeabi-v7a:arm64-v8a:x86
+PROP_APP_ABI=armeabi-v7a
+
+# uncomment it and fill in sign information for release mode
+#RELEASE_STORE_FILE=file path of keystore
+#RELEASE_STORE_PASSWORD=password of keystore
+#RELEASE_KEY_ALIAS=alias of key
+#RELEASE_KEY_PASSWORD=password of key
+
+android.injected.testOnly=false

BIN
spine-cocos2dx/example-v4/proj.android/gradle/wrapper/gradle-wrapper.jar


+ 6 - 0
spine-cocos2dx/example-v4/proj.android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Tue Mar 14 17:40:59 CST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

+ 164 - 0
spine-cocos2dx/example-v4/proj.android/gradlew

@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >&-
+APP_HOME="`pwd -P`"
+cd "$SAVED" >&-
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90 - 0
spine-cocos2dx/example-v4/proj.android/gradlew.bat

@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 4 - 0
spine-cocos2dx/example-v4/proj.android/settings.gradle

@@ -0,0 +1,4 @@
+include ':libcocos2dx'
+project(':libcocos2dx').projectDir = new File(settingsDir, '../cocos2d/cocos/platform/android/libcocos2dx')
+include ':spine-cocos2dx-example'
+project(':spine-cocos2dx-example').projectDir = new File(settingsDir, 'app')

+ 38 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/AppController.h

@@ -0,0 +1,38 @@
+/****************************************************************************
+ Copyright (c) 2010-2013 cocos2d-x.org
+ Copyright (c) 2013-2016 Chukong Technologies Inc.
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#import <UIKit/UIKit.h>
+
+@class RootViewController;
+
+@interface AppController : NSObject <UIApplicationDelegate> {
+
+}
+
+@property(nonatomic, readonly) RootViewController* viewController;
+
+@end
+

+ 153 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/AppController.mm

@@ -0,0 +1,153 @@
+/****************************************************************************
+ Copyright (c) 2010-2013 cocos2d-x.org
+ Copyright (c) 2013-2016 Chukong Technologies Inc.
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#import "AppController.h"
+#import "cocos2d.h"
+#import "AppDelegate.h"
+#import "RootViewController.h"
+
+@implementation AppController
+
+@synthesize window;
+
+#pragma mark -
+#pragma mark Application lifecycle
+
+// cocos2d application instance
+static AppDelegate s_sharedApplication;
+
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+    
+    cocos2d::Application *app = cocos2d::Application::getInstance();
+    
+    // Initialize the GLView attributes
+    app->initGLContextAttrs();
+    cocos2d::GLViewImpl::convertAttrs();
+    
+    // Override point for customization after application launch.
+
+    // Add the view controller's view to the window and display.
+    window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
+
+    // Use RootViewController to manage CCEAGLView
+    _viewController = [[RootViewController alloc]init];
+    _viewController.wantsFullScreenLayout = YES;
+    
+
+    // Set RootViewController to window
+    if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0)
+    {
+        // warning: addSubView doesn't work on iOS6
+        [window addSubview: _viewController.view];
+    }
+    else
+    {
+        // use this method on ios6
+        [window setRootViewController:_viewController];
+    }
+
+    [window makeKeyAndVisible];
+
+    [[UIApplication sharedApplication] setStatusBarHidden:true];
+    
+    //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior.
+    if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f)
+    {
+        [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"];
+    }
+    
+    // IMPORTANT: Setting the GLView should be done after creating the RootViewController
+    cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view);
+    cocos2d::Director::getInstance()->setOpenGLView(glview);
+    
+    //run the cocos2d-x game scene
+    app->run();
+
+    return YES;
+}
+
+
+- (void)applicationWillResignActive:(UIApplication *)application {
+    /*
+     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
+     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
+     */
+    // We don't need to call this method any more. It will interrupt user defined game pause&resume logic
+    /* cocos2d::Director::getInstance()->pause(); */
+}
+
+- (void)applicationDidBecomeActive:(UIApplication *)application {
+    /*
+     Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
+     */
+    // We don't need to call this method any more. It will interrupt user defined game pause&resume logic
+    /* cocos2d::Director::getInstance()->resume(); */
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+    /*
+     Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
+     If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
+     */
+    cocos2d::Application::getInstance()->applicationDidEnterBackground();
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+    /*
+     Called as part of  transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
+     */
+    cocos2d::Application::getInstance()->applicationWillEnterForeground();
+}
+
+- (void)applicationWillTerminate:(UIApplication *)application {
+    /*
+     Called when the application is about to terminate.
+     See also applicationDidEnterBackground:.
+     */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
+    /*
+     Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
+     */
+}
+
+
+#if __has_feature(objc_arc)
+#else
+- (void)dealloc {
+    [window release];
+    [_viewController release];
+    [super dealloc];
+}
+#endif
+
+
+@end

+ 157 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,157 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-29.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "3x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "Icon-57.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "57x57",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "[email protected]",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-20.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-29.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-40.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "Icon-50.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "50x50",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "Icon-72.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "72x72",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-76.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "[email protected]",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ios-marketing",
+      "size" : "1024x1024",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/AppIcon.appiconset/[email protected]


+ 6 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/Images.xcassets/Contents.json

@@ -0,0 +1,6 @@
+{
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 45 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/Info.plist

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+    <key>CFBundleDevelopmentRegion</key>
+    <string>English</string>
+    <key>CFBundleDisplayName</key>
+    <string>${PRODUCT_NAME}</string>
+    <key>CFBundleExecutable</key>
+    <string>${EXECUTABLE_NAME}</string>
+    <key>CFBundleIconFile</key>
+    <string>Icon-57.png</string>
+    <key>CFBundleIdentifier</key>
+    <string>org.cocos2dx.${PRODUCT_NAME}</string>
+    <key>CFBundleInfoDictionaryVersion</key>
+    <string>6.0</string>
+    <key>CFBundleName</key>
+    <string>${PRODUCT_NAME}</string>
+    <key>CFBundleShortVersionString</key>
+    <string>1.0</string>
+    <key>CFBundlePackageType</key>
+    <string>APPL</string>
+    <key>CFBundleSignature</key>
+    <string>????</string>
+    <key>CFBundleVersion</key>
+    <string>1</string>
+    <key>LSRequiresIPhoneOS</key>
+    <true/>
+    <key>UIAppFonts</key>
+    <array/>
+    <key>UILaunchStoryboardName</key>
+    <string>LaunchScreen</string>
+    <key>UIPrerenderedIcon</key>
+    <true/>
+    <key>UIStatusBarHidden</key>
+    <true/>
+    <key>UISupportedInterfaceOrientations</key>
+    <array>
+        <string>UIInterfaceOrientationLandscapeRight</string>
+        <string>UIInterfaceOrientationLandscapeLeft</string>
+    </array>
+    <key>NSHumanReadableCopyright</key>
+    <string>Copyright © 2019. All rights reserved.</string>
+</dict>
+</plist>

+ 45 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/LaunchScreen.storyboard

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <device id="retina5_9" orientation="landscape">
+        <adaptation id="fullscreen"/>
+    </device>
+    <dependencies>
+        <deployment version="1792" identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="fm7-M6-edp"/>
+                        <viewControllerLayoutGuide type="bottom" id="uRH-d6-mvd"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="812" height="375"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFill" insetsLayoutMarginsFromSafeArea="NO" image="LaunchScreenBackground.png" translatesAutoresizingMaskIntoConstraints="NO" id="YCC-wj-Gww" userLabel="Background">
+                                <rect key="frame" x="0.0" y="0.0" width="812" height="375"/>
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstAttribute="bottom" secondItem="YCC-wj-Gww" secondAttribute="bottom" id="Naz-ae-jWI"/>
+                            <constraint firstAttribute="trailing" secondItem="YCC-wj-Gww" secondAttribute="trailing" id="myj-85-hk9"/>
+                            <constraint firstItem="YCC-wj-Gww" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="qOq-Cg-doS"/>
+                            <constraint firstItem="YCC-wj-Gww" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xL7-Fo-4bl"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="50.399999999999999" y="373.15270935960592"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchScreenBackground.png" width="2208" height="1242"/>
+    </resources>
+</document>

BIN
spine-cocos2dx/example-v4/proj.ios_mac/ios/LaunchScreenBackground.png


+ 12 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/Prefix.pch

@@ -0,0 +1,12 @@
+//
+// Prefix header for all source files of the 'iphone' target in the 'iphone' project
+//
+
+#ifdef __OBJC__
+    #import <Foundation/Foundation.h>
+    #import <UIKit/UIKit.h>
+#endif
+
+#ifdef __cplusplus
+	#include "cocos2d.h"
+#endif

+ 35 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/RootViewController.h

@@ -0,0 +1,35 @@
+/****************************************************************************
+ Copyright (c) 2013      cocos2d-x.org
+ Copyright (c) 2013-2016 Chukong Technologies Inc.
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+
+ http://www.cocos2d-x.org
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#import <UIKit/UIKit.h>
+
+
+@interface RootViewController : UIViewController {
+
+}
+- (BOOL) prefersStatusBarHidden;
+
+@end

+ 122 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/RootViewController.mm

@@ -0,0 +1,122 @@
+/****************************************************************************
+ Copyright (c) 2013      cocos2d-x.org
+ Copyright (c) 2013-2016 Chukong Technologies Inc.
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+
+ http://www.cocos2d-x.org
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#import "RootViewController.h"
+#import "cocos2d.h"
+#import "platform/ios/CCEAGLView-ios.h"
+
+
+@implementation RootViewController
+
+/*
+ // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
+    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
+        // Custom initialization
+    }
+    return self;
+}
+*/
+
+// Implement loadView to create a view hierarchy programmatically, without using a nib.
+- (void)loadView {
+    // Initialize the CCEAGLView
+    CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [UIScreen mainScreen].bounds
+                                         pixelFormat: (__bridge NSString *)cocos2d::GLViewImpl::_pixelFormat
+                                         depthFormat: cocos2d::GLViewImpl::_depthFormat
+                                  preserveBackbuffer: NO
+                                          sharegroup: nil
+                                       multiSampling: cocos2d::GLViewImpl::_multisamplingCount > 0 ? YES : NO
+                                     numberOfSamples: cocos2d::GLViewImpl::_multisamplingCount ];
+    
+    // Enable or disable multiple touches
+    [eaglView setMultipleTouchEnabled:NO];
+    
+    // Set EAGLView as view of RootViewController
+    self.view = eaglView;
+}
+
+// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
+- (void)viewDidLoad {
+    [super viewDidLoad];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+}
+
+- (void)viewDidDisappear:(BOOL)animated {
+    [super viewDidDisappear:animated];
+}
+
+
+// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead
+#ifdef __IPHONE_6_0
+- (NSUInteger) supportedInterfaceOrientations{
+    return UIInterfaceOrientationMaskAllButUpsideDown;
+}
+#endif
+
+- (BOOL) shouldAutorotate {
+    return YES;
+}
+
+- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
+    [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
+
+    auto glview = cocos2d::Director::getInstance()->getOpenGLView();
+
+    if (glview)
+    {
+        CCEAGLView *eaglview = (__bridge CCEAGLView *)glview->getEAGLView();
+
+        if (eaglview)
+        {
+            CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]);
+            cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height);
+        }
+    }
+}
+
+//fix not hide status on ios7
+- (BOOL)prefersStatusBarHidden {
+    return YES;
+}
+
+// Controls the application's preferred home indicator auto-hiding when this view controller is shown.
+- (BOOL)prefersHomeIndicatorAutoHidden {
+    return YES;
+}
+
+- (void)didReceiveMemoryWarning {
+    // Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+
+    // Release any cached data, images, etc that aren't in use.
+}
+
+
+@end

+ 15 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/exportoptions.plist

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>compileBitcode</key>
+	<false/>
+	<key>method</key>
+	<string>development</string>
+	<key>provisioningProfiles</key>
+	<dict>
+		<key>Bundle Identifier</key>
+		<string>Provision Prifile Name</string>
+	</dict>
+</dict>
+</plist>

+ 7 - 0
spine-cocos2dx/example-v4/proj.ios_mac/ios/main.m

@@ -0,0 +1,7 @@
+#import <UIKit/UIKit.h>
+
+int main(int argc, char *argv[]) {
+    @autoreleasepool {
+        return UIApplicationMain(argc, argv, nil, @"AppController");
+    }
+}

BIN
spine-cocos2dx/example-v4/proj.ios_mac/mac/Icon.icns


+ 36 - 0
spine-cocos2dx/example-v4/proj.ios_mac/mac/Info.plist

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>Icon</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.esotericsoftware.spine</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSApplicationCategoryType</key>
+	<string>public.app-category.games</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright © 2013. All rights reserved.</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 11 - 0
spine-cocos2dx/example-v4/proj.ios_mac/mac/Prefix.pch

@@ -0,0 +1,11 @@
+//
+// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project
+//
+
+#ifdef __OBJC__
+	#import <Cocoa/Cocoa.h>
+#endif
+
+#ifdef __cplusplus
+	#include "cocos2d.h"
+#endif

+ 35 - 0
spine-cocos2dx/example-v4/proj.ios_mac/mac/main.cpp

@@ -0,0 +1,35 @@
+/****************************************************************************
+ Copyright (c) 2010 cocos2d-x.org
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#include "AppDelegate.h"
+#include "cocos2d.h"
+
+USING_NS_CC;
+
+int main(int argc, char *argv[])
+{
+    AppDelegate app;
+    return Application::getInstance()->run();
+}

+ 39 - 0
spine-cocos2dx/example-v4/proj.linux/main.cpp

@@ -0,0 +1,39 @@
+/****************************************************************************
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#include "../Classes/AppDelegate.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string>
+
+USING_NS_CC;
+
+int main(int argc, char **argv)
+{
+    // create the application instance
+    AppDelegate app;
+    return Application::getInstance()->run();
+}

+ 8 - 0
spine-cocos2dx/example-v4/proj.win32/build-cfg.json

@@ -0,0 +1,8 @@
+{
+    "copy_resources": [
+        {
+            "from": "../Resources",
+            "to": ""
+        }
+    ]
+}

+ 86 - 0
spine-cocos2dx/example-v4/proj.win32/game.rc

@@ -0,0 +1,86 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE 
+BEGIN
+    "resource.h\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+GLFW_ICON           ICON                    "res\\game.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904B0"
+        BEGIN
+            VALUE "CompanyName", "\0"
+            VALUE "FileDescription", "game Module\0"
+            VALUE "FileVersion", "1, 0, 0, 1\0"
+            VALUE "InternalName", "game\0"
+            VALUE "LegalCopyright", "Copyright \0"
+            VALUE "OriginalFilename", "game.exe\0"
+            VALUE "ProductName", "game Module\0"
+            VALUE "ProductVersion", "1, 0, 0, 1\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x0409, 0x04B0
+    END
+END
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)

+ 42 - 0
spine-cocos2dx/example-v4/proj.win32/main.cpp

@@ -0,0 +1,42 @@
+/****************************************************************************
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#include "main.h"
+#include "AppDelegate.h"
+#include "cocos2d.h"
+
+USING_NS_CC;
+
+int WINAPI _tWinMain(HINSTANCE hInstance,
+                       HINSTANCE hPrevInstance,
+                       LPTSTR    lpCmdLine,
+                       int       nCmdShow)
+{
+    UNREFERENCED_PARAMETER(hPrevInstance);
+    UNREFERENCED_PARAMETER(lpCmdLine);
+
+    // create the application instance
+    AppDelegate app;
+    return Application::getInstance()->run();
+}

+ 37 - 0
spine-cocos2dx/example-v4/proj.win32/main.h

@@ -0,0 +1,37 @@
+/****************************************************************************
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+#ifndef __MAIN_H__
+#define __MAIN_H__
+
+#define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
+
+// Windows Header Files:
+#include <windows.h>
+#include <tchar.h>
+
+// C RunTime Header Files
+#include "platform/CCStdC.h"
+
+#endif    // __MAIN_H__

BIN
spine-cocos2dx/example-v4/proj.win32/res/game.ico


+ 44 - 0
spine-cocos2dx/example-v4/proj.win32/resource.h

@@ -0,0 +1,44 @@
+/****************************************************************************
+ Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
+ 
+ http://www.cocos2d-x.org
+ 
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ 
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ 
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+ ****************************************************************************/
+
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by game.RC
+//
+
+#define IDS_PROJNAME                100
+#define IDR_TESTJS    100
+
+#define ID_FILE_NEW_WINDOW            32771
+
+// Next default values for new objects
+// 
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE    201
+#define _APS_NEXT_CONTROL_VALUE        1000
+#define _APS_NEXT_SYMED_VALUE        101
+#define _APS_NEXT_COMMAND_VALUE        32775
+#endif
+#endif

+ 3 - 1
spine-cocos2dx/example/.gitignore

@@ -1,5 +1,7 @@
 bin/
+build/
+build-linux/
 proj.android/bin/
 proj.android/assets/
 proj.android/libs/
-proj.android/obj/
+proj.android/obj/

+ 102 - 73
spine-cocos2dx/example/CMakeLists.txt

@@ -22,9 +22,9 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 # THE SOFTWARE.
 # ****************************************************************************/
-cmake_policy(SET CMP0017 NEW)
+#cmake_policy(SET CMP0017 NEW)
 
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.8)
 
 set(APP_NAME MyGame)
 project (${APP_NAME})
@@ -32,6 +32,8 @@ project (${APP_NAME})
 set(COCOS2D_ROOT ${CMAKE_SOURCE_DIR}/cocos2d)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${COCOS2D_ROOT}/cmake/Modules/")
+
+include(CocosConfigDefine)
 include(CocosBuildHelpers)
 
 # libcocos2d
@@ -39,53 +41,76 @@ set(BUILD_CPP_EMPTY_TEST OFF CACHE BOOL "turn off build cpp-empty-test")
 set(BUILD_CPP_TESTS OFF CACHE BOOL "turn off build cpp-tests")
 set(BUILD_LUA_LIBS OFF CACHE BOOL "turn off build lua related targets")
 set(BUILD_JS_LIBS OFF CACHE BOOL "turn off build js related targets")
+
+
+set(BUILD_EDITOR_SPINE ON CACHE BOOL "enable spine")
+
+include_directories(
+  ${CMAKE_CURRENT_LIST_DIR}/../../spine-cpp/spine-cpp/include
+  ${CMAKE_CURRENT_LIST_DIR}/../src
+)
+
 add_subdirectory(${COCOS2D_ROOT})
 
-# Some macro definitions
-if(WINDOWS)
-  if(BUILD_SHARED_LIBS)
-    ADD_DEFINITIONS (-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL)
-  else()
-    ADD_DEFINITIONS (-DCC_STATIC)
-  endif()
+get_target_property(COCOS2D_X_VERSION cocos2d VERSION)
+set(COCOS2DX_ROOT_PATH ${COCOS2D_ROOT})
 
-  ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
-  set(PLATFORM_FOLDER win32)
-elseif(MACOSX OR APPLE)
-  ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
-  ADD_DEFINITIONS (-DUSE_FILE32API)
-  set(PLATFORM_FOLDER mac)
-elseif(LINUX)
-  ADD_DEFINITIONS(-DLINUX)
-  set(PLATFORM_FOLDER linux)
-elseif(ANDROID)
-  ADD_DEFINITIONS (-DUSE_FILE32API)
-  set(PLATFORM_FOLDER android)
-else()
-  message( FATAL_ERROR "Unsupported platform, CMake will exit" )
-endif()
+# Some macro definitions
+# if(WINDOWS)
+#   if(BUILD_SHARED_LIBS)
+#     ADD_DEFINITIONS (-D_USRDLL -D_EXPORT_DLL_ -D_USEGUIDLL -D_USREXDLL -D_USRSTUDIODLL)
+#   else()
+#     ADD_DEFINITIONS (-DCC_STATIC)
+#   endif()
+
+#   ADD_DEFINITIONS (-DCOCOS2DXWIN32_EXPORTS -D_WINDOWS -DWIN32 -D_WIN32)
+#   set(PLATFORM_FOLDER win32)
+# elseif(MACOSX OR APPLE)
+#   ADD_DEFINITIONS (-DCC_TARGET_OS_MAC)
+#   ADD_DEFINITIONS (-DUSE_FILE32API)
+#   set(PLATFORM_FOLDER mac)
+# elseif(LINUX)
+#   ADD_DEFINITIONS(-DLINUX)
+#   set(PLATFORM_FOLDER linux)
+# elseif(ANDROID)
+#   ADD_DEFINITIONS (-DUSE_FILE32API)
+#   set(PLATFORM_FOLDER android)
+# else()
+#   message( FATAL_ERROR "Unsupported platform, CMake will exit" )
+# endif()
 
 
 # Compiler options
-if(MSVC)
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
-                  -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
-                  -wd4514 -wd4056 -wd4996 -wd4099)
-else()
-  set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1")
-  set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
-  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
-  if(CLANG)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
-  endif()
-endif(MSVC)
+# if(MSVC)
+#   ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+#                   -wd4251 -wd4244 -wd4334 -wd4005 -wd4820 -wd4710
+#                   -wd4514 -wd4056 -wd4996 -wd4099)
+# else()
+#   set(CMAKE_C_FLAGS_DEBUG "-g -Wall -DCOCOS2D_DEBUG=1")
+#   set(CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+#   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+#   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-deprecated-declarations -Wno-reorder")
+#   if(CLANG)
+#     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+#   endif()
+# endif(MSVC)
 
 
 set(PLATFORM_SPECIFIC_SRC)
 set(PLATFORM_SPECIFIC_HEADERS)
+set(cc_common_res)
+
+
+set(GAME_RES_FOLDER  ${CMAKE_CURRENT_SOURCE_DIR}/Resources)
+if(APPLE OR VS)
+  cocos_mark_multi_resources(cc_common_res RES_TO "Resources" FOLDERS ${GAME_RES_FOLDER})
+endif()
 
 if(MACOSX OR APPLE)
+    set(APP_UI_RES
+    proj.ios_mac/mac/Icon.icns
+    proj.ios_mac/mac/Info.plist
+    )
     set(PLATFORM_SPECIFIC_SRC
       proj.ios_mac/mac/main.cpp
     )
@@ -107,30 +132,19 @@ elseif(ANDROID)
     )
 endif()
 
-include_directories(
-  /usr/local/include/GLFW
-  /usr/include/GLFW
-  ${COCOS2D_ROOT}/cocos
-  ${COCOS2D_ROOT}/cocos/platform
-  ${COCOS2D_ROOT}/cocos/audio/include/
-  Classes
-)
-if ( WIN32 )
-  include_directories(
-  ${COCOS2D_ROOT}/external/glfw3/include/win32
-  ${COCOS2D_ROOT}/external/win32-specific/gles/include/OGLES
-)
-endif( WIN32 )
+
+file(GLOB GAME_CLASSES_SOURCES "Classes/*.cpp")
+file(GLOB GAME_CLASSES_HEADERS "Classes/*.h")
 
 set(GAME_SRC
-  Classes/AppDelegate.cpp
-  Classes/HelloWorldScene.cpp
+  ${GAME_CLASSES_SOURCES}
   ${PLATFORM_SPECIFIC_SRC}
+  ${cc_common_res}
 )
 
+
 set(GAME_HEADERS
-  Classes/AppDelegate.h
-  Classes/HelloWorldScene.h
+  ${GAME_CLASSES_HEADERS}
   ${PLATFORM_SPECIFIC_HEADERS}
 )
 
@@ -143,27 +157,42 @@ else()
     add_executable(${APP_NAME} ${GAME_SRC} ${GAME_HEADERS})
 endif()
 
+target_include_directories(${APP_NAME} PRIVATE Classes)
 target_link_libraries(${APP_NAME} cocos2d)
 
-set(APP_BIN_DIR "${CMAKE_BINARY_DIR}/bin")
-
-set_target_properties(${APP_NAME} PROPERTIES
-     RUNTIME_OUTPUT_DIRECTORY  "${APP_BIN_DIR}")
-
-if ( WIN32 )
-  #also copying dlls to binary directory for the executable to run
-  pre_build(${APP_NAME}
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
-    COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/gles/prebuilt/glew32.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
-	COMMAND ${CMAKE_COMMAND} -E copy ${COCOS2D_ROOT}/external/win32-specific/zlib/prebuilt/zlib1.dll ${APP_BIN_DIR}/${CMAKE_BUILD_TYPE}
-	)
-elseif( ANDROID )
+setup_cocos_app_config(${APP_NAME})
 
+if(COMMAND cocos_get_resource_path)
+  cocos_get_resource_path(APP_RES_DIR ${APP_NAME})
 else()
-  pre_build(${APP_NAME}
-    COMMAND ${CMAKE_COMMAND} -E remove_directory ${APP_BIN_DIR}/Resources
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/Resources ${APP_BIN_DIR}/Resources
-    )
+  set(APP_RES_DIR "$<TARGET_FILE_DIR:${APP_NAME}>/Resources")
+endif()
+
+if(APPLE)
+  set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${API_UI_RES}")
+  if(MACOSX)
+    set_target_properties(${APP_NAME} PROPERTIES
+                          MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist"
+                          )
+  elseif(IOS)
+    cocos_pak_xcode(${APP_NAME} INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/Info.plist")
+    set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon-${APP_NAME}")
+    set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
+    set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "")
+    set_xcode_property(${APP_NAME} CODE_SIGN_IDENTITY "iPhone Developer")
+  endif()
+elseif(WINDOWS)
+  cocos_copy_target_dll(${APP_NAME} COPY_TO ${APP_RES_DIR}/..)
+endif()
 
+if(LINUX OR WINDOWS)
+  if("${COCOS2D_X_VERSION}" VERSION_LESS "4.0")
+    if(COMMAND cocos_copy_res)
+      cocos_copy_res(COPY_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
+    else()
+      cocos_copy_target_res(${APP_NAME} COPY_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
+    endif()
+  else()
+    cocos_copy_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${GAME_RES_FOLDER})
+  endif()
 endif()

+ 0 - 1
spine-cocos2dx/example/Classes/AppDelegate.cpp

@@ -36,7 +36,6 @@
 #include <spine/spine-cocos2dx.h>
 #include <spine/Debug.h>
 #include "AppMacros.h"
-#include <spine/SkeletonTwoColorBatch.h>
 
 USING_NS_CC;
 using namespace std;

+ 1 - 1
spine-cocos2dx/example/proj.ios_mac/ios/Info.plist

@@ -55,7 +55,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string></string>
+	<string>1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>

+ 52 - 30
spine-cocos2dx/example/proj.ios_mac/spine-cocos2d-x.xcodeproj/project.pbxproj

@@ -166,12 +166,11 @@
 		763105D820BC1B9700927A1E /* Updatable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104A520BC1B5600927A1E /* Updatable.cpp */; };
 		763105D920BC1B9700927A1E /* VertexAttachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7631049220BC1B5500927A1E /* VertexAttachment.cpp */; };
 		763105DA20BC1B9700927A1E /* VertexEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763104AE20BC1B5800927A1E /* VertexEffect.cpp */; };
+		763A8A98239FDC0400FBEDDC /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 763A8A97239FDC0400FBEDDC /* SkeletonRenderer.cpp */; };
 		76798D1D22A95AB400F77964 /* ConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76798D1C22A95AB300F77964 /* ConstraintData.cpp */; };
 		76798D1E22A95AEF00F77964 /* ConstraintData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76798D1C22A95AB300F77964 /* ConstraintData.cpp */; };
 		767D80E322B29F22000BD703 /* MixAndMatchExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 767D80E022B29F22000BD703 /* MixAndMatchExample.cpp */; };
 		767D80E422B2A003000BD703 /* MixAndMatchExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 767D80E022B29F22000BD703 /* MixAndMatchExample.cpp */; };
-		76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; };
-		76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */; };
 		76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */; };
 		76AAA3C11D180F7C00C54FCB /* BatchingExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B61D180F7C00C54FCB /* BatchingExample.cpp */; };
 		76AAA3C21D180F7C00C54FCB /* GoblinsExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B81D180F7C00C54FCB /* GoblinsExample.cpp */; };
@@ -179,17 +178,11 @@
 		76AAA3C51D180F7C00C54FCB /* SpineboyExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3BE1D180F7C00C54FCB /* SpineboyExample.cpp */; };
 		76AAA40C1D18106000C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; };
 		76AAA40E1D18106000C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; };
-		76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; };
-		76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */; };
 		76AAA4111D18106000C54FCB /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */; };
 		76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */; };
 		76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4011D18106000C54FCB /* AttachmentVertices.h */; };
 		76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */; };
 		76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4051D18106000C54FCB /* SkeletonAnimation.h */; };
-		76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */; };
-		76AAA4191D18119F00C54FCB /* SkeletonBatch.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4071D18106000C54FCB /* SkeletonBatch.h */; };
-		76AAA41A1D18119F00C54FCB /* SkeletonRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */; };
-		76AAA41B1D18119F00C54FCB /* SkeletonRenderer.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA4091D18106000C54FCB /* SkeletonRenderer.h */; };
 		76AAA41C1D18119F00C54FCB /* spine-cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */; };
 		76AAA41D1D18119F00C54FCB /* spine-cocos2dx.h in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA40B1D18106000C54FCB /* spine-cocos2dx.h */; };
 		76AAA43B1D1811B000C54FCB /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */; };
@@ -209,8 +202,14 @@
 		76C893B1236715B8009D8DC8 /* IKExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76C893AE236715B8009D8DC8 /* IKExample.cpp */; };
 		76D1BFE02029E35200A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; };
 		76D1BFE12029E37700A0272D /* SkeletonRendererSeparatorExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */; };
+		76D28ACB239FAF0B00FB142D /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D28AC5239FAF0A00FB142D /* SkeletonTwoColorBatch.cpp */; };
+		76D28ACD239FAF0B00FB142D /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D28ACA239FAF0B00FB142D /* SkeletonBatch.cpp */; };
+		76D28ACE239FAF2C00FB142D /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D28ACA239FAF0B00FB142D /* SkeletonBatch.cpp */; };
+		76D28AD0239FAF2C00FB142D /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D28AC5239FAF0A00FB142D /* SkeletonTwoColorBatch.cpp */; };
 		76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; };
 		76D520E71EB3634600572471 /* CoinExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76D520E41EB362DD00572471 /* CoinExample.cpp */; };
+		76F1083A239FC8DA005B0CE9 /* SkeletonTwoColorBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F10837239FC8DA005B0CE9 /* SkeletonTwoColorBatch.cpp */; };
+		76F1083B239FC8DA005B0CE9 /* SkeletonBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F10838239FC8DA005B0CE9 /* SkeletonBatch.cpp */; };
 		76F5BD551D2BD7D3005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; };
 		76F5BD561D2BD7EF005917E5 /* TankExample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD531D2BD7D3005917E5 /* TankExample.cpp */; };
 		76F5BD571D2BD7EF005917E5 /* TankExample.h in Sources */ = {isa = PBXBuildFile; fileRef = 76F5BD541D2BD7D3005917E5 /* TankExample.h */; };
@@ -367,11 +366,10 @@
 		763104C020BC1B5E00927A1E /* SkeletonBounds.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBounds.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp"; sourceTree = "<group>"; };
 		763104C120BC1B5E00927A1E /* ShearTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ShearTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp"; sourceTree = "<group>"; };
 		763104C220BC1B5E00927A1E /* TranslateTimeline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslateTimeline.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp"; sourceTree = "<group>"; };
+		763A8A97239FDC0400FBEDDC /* SkeletonRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonRenderer.cpp; path = ../../src/spine/SkeletonRenderer.cpp; sourceTree = "<group>"; };
 		76798D1C22A95AB300F77964 /* ConstraintData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConstraintData.cpp; path = "../../../spine-cpp/spine-cpp/src/spine/ConstraintData.cpp"; sourceTree = "<group>"; };
 		767D80E022B29F22000BD703 /* MixAndMatchExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MixAndMatchExample.cpp; sourceTree = "<group>"; };
 		767D80E222B29F22000BD703 /* MixAndMatchExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MixAndMatchExample.h; sourceTree = "<group>"; };
-		76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonTwoColorBatch.cpp; path = ../../src/spine/SkeletonTwoColorBatch.cpp; sourceTree = "<group>"; };
-		76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonTwoColorBatch.h; path = ../../src/spine/SkeletonTwoColorBatch.h; sourceTree = "<group>"; };
 		76AAA3B31D180F7C00C54FCB /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = "<group>"; };
 		76AAA3B41D180F7C00C54FCB /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
 		76AAA3B51D180F7C00C54FCB /* AppMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppMacros.h; sourceTree = "<group>"; };
@@ -387,10 +385,6 @@
 		76AAA4011D18106000C54FCB /* AttachmentVertices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentVertices.h; path = ../../src/spine/AttachmentVertices.h; sourceTree = "<group>"; };
 		76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonAnimation.cpp; path = ../../src/spine/SkeletonAnimation.cpp; sourceTree = "<group>"; };
 		76AAA4051D18106000C54FCB /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = ../../src/spine/SkeletonAnimation.h; sourceTree = "<group>"; };
-		76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBatch.cpp; path = ../../src/spine/SkeletonBatch.cpp; sourceTree = "<group>"; };
-		76AAA4071D18106000C54FCB /* SkeletonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBatch.h; path = ../../src/spine/SkeletonBatch.h; sourceTree = "<group>"; };
-		76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonRenderer.cpp; path = ../../src/spine/SkeletonRenderer.cpp; sourceTree = "<group>"; };
-		76AAA4091D18106000C54FCB /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonRenderer.h; path = ../../src/spine/SkeletonRenderer.h; sourceTree = "<group>"; };
 		76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "spine-cocos2dx.cpp"; path = "../../src/spine/spine-cocos2dx.cpp"; sourceTree = "<group>"; };
 		76AAA40B1D18106000C54FCB /* spine-cocos2dx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "spine-cocos2dx.h"; path = "../../src/spine/spine-cocos2dx.h"; sourceTree = "<group>"; };
 		76AAA4521D18132D00C54FCB /* common */ = {isa = PBXFileReference; lastKnownFileType = folder; path = common; sourceTree = "<group>"; };
@@ -398,8 +392,17 @@
 		76C893AF236715B8009D8DC8 /* IKExample.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IKExample.h; sourceTree = "<group>"; };
 		76D1BFDE2029E35100A0272D /* SkeletonRendererSeparatorExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkeletonRendererSeparatorExample.h; sourceTree = "<group>"; };
 		76D1BFDF2029E35200A0272D /* SkeletonRendererSeparatorExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkeletonRendererSeparatorExample.cpp; sourceTree = "<group>"; };
+		76D28AC5239FAF0A00FB142D /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonTwoColorBatch.cpp; path = ../../src/spine/v3/SkeletonTwoColorBatch.cpp; sourceTree = "<group>"; };
+		76D28AC6239FAF0B00FB142D /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonTwoColorBatch.h; path = ../../src/spine/v3/SkeletonTwoColorBatch.h; sourceTree = "<group>"; };
+		76D28AC8239FAF0B00FB142D /* SkeletonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBatch.h; path = ../../src/spine/v3/SkeletonBatch.h; sourceTree = "<group>"; };
+		76D28ACA239FAF0B00FB142D /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBatch.cpp; path = ../../src/spine/v3/SkeletonBatch.cpp; sourceTree = "<group>"; };
 		76D520E41EB362DD00572471 /* CoinExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoinExample.cpp; sourceTree = "<group>"; };
 		76D520E51EB362DD00572471 /* CoinExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoinExample.h; sourceTree = "<group>"; };
+		76F10834239FC8D9005B0CE9 /* SkeletonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBatch.h; path = ../../src/spine/v4/SkeletonBatch.h; sourceTree = "<group>"; };
+		76F10835239FC8DA005B0CE9 /* SkeletonTwoColorBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonTwoColorBatch.h; path = ../../src/spine/v4/SkeletonTwoColorBatch.h; sourceTree = "<group>"; };
+		76F10837239FC8DA005B0CE9 /* SkeletonTwoColorBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonTwoColorBatch.cpp; path = ../../src/spine/v4/SkeletonTwoColorBatch.cpp; sourceTree = "<group>"; };
+		76F10838239FC8DA005B0CE9 /* SkeletonBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkeletonBatch.cpp; path = ../../src/spine/v4/SkeletonBatch.cpp; sourceTree = "<group>"; };
+		76F1083C239FC8E5005B0CE9 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonRenderer.h; path = ../../src/spine/SkeletonRenderer.h; sourceTree = "<group>"; };
 		76F5BD531D2BD7D3005917E5 /* TankExample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TankExample.cpp; sourceTree = "<group>"; };
 		76F5BD541D2BD7D3005917E5 /* TankExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TankExample.h; sourceTree = "<group>"; };
 		8262943D1AAF051F00CB7CF7 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
@@ -691,22 +694,42 @@
 		76AAA3FF1D18102C00C54FCB /* spine-cocos2dx */ = {
 			isa = PBXGroup;
 			children = (
-				76A45BDC1E64396800745AA1 /* SkeletonTwoColorBatch.cpp */,
-				76A45BDD1E64396800745AA1 /* SkeletonTwoColorBatch.h */,
-				76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */,
-				76AAA4011D18106000C54FCB /* AttachmentVertices.h */,
+				76F10833239FC8CB005B0CE9 /* v4 */,
+				76D28AC2239FAED800FB142D /* v3 */,
 				76AAA4041D18106000C54FCB /* SkeletonAnimation.cpp */,
 				76AAA4051D18106000C54FCB /* SkeletonAnimation.h */,
-				76AAA4061D18106000C54FCB /* SkeletonBatch.cpp */,
-				76AAA4071D18106000C54FCB /* SkeletonBatch.h */,
-				76AAA4081D18106000C54FCB /* SkeletonRenderer.cpp */,
-				76AAA4091D18106000C54FCB /* SkeletonRenderer.h */,
+				763A8A97239FDC0400FBEDDC /* SkeletonRenderer.cpp */,
+				76F1083C239FC8E5005B0CE9 /* SkeletonRenderer.h */,
+				76AAA4001D18106000C54FCB /* AttachmentVertices.cpp */,
+				76AAA4011D18106000C54FCB /* AttachmentVertices.h */,
 				76AAA40A1D18106000C54FCB /* spine-cocos2dx.cpp */,
 				76AAA40B1D18106000C54FCB /* spine-cocos2dx.h */,
 			);
 			name = "spine-cocos2dx";
 			sourceTree = "<group>";
 		};
+		76D28AC2239FAED800FB142D /* v3 */ = {
+			isa = PBXGroup;
+			children = (
+				76D28ACA239FAF0B00FB142D /* SkeletonBatch.cpp */,
+				76D28AC8239FAF0B00FB142D /* SkeletonBatch.h */,
+				76D28AC5239FAF0A00FB142D /* SkeletonTwoColorBatch.cpp */,
+				76D28AC6239FAF0B00FB142D /* SkeletonTwoColorBatch.h */,
+			);
+			name = v3;
+			sourceTree = "<group>";
+		};
+		76F10833239FC8CB005B0CE9 /* v4 */ = {
+			isa = PBXGroup;
+			children = (
+				76F10838239FC8DA005B0CE9 /* SkeletonBatch.cpp */,
+				76F10834239FC8D9005B0CE9 /* SkeletonBatch.h */,
+				76F10837239FC8DA005B0CE9 /* SkeletonTwoColorBatch.cpp */,
+				76F10835239FC8DA005B0CE9 /* SkeletonTwoColorBatch.h */,
+			);
+			name = v4;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -855,7 +878,9 @@
 				763104EF20BC1B5E00927A1E /* IkConstraintTimeline.cpp in Sources */,
 				763104D820BC1B5E00927A1E /* AnimationState.cpp in Sources */,
 				763104EE20BC1B5E00927A1E /* SkeletonClipping.cpp in Sources */,
+				76F1083A239FC8DA005B0CE9 /* SkeletonTwoColorBatch.cpp in Sources */,
 				763104E420BC1B5E00927A1E /* ClippingAttachment.cpp in Sources */,
+				76D28ACD239FAF0B00FB142D /* SkeletonBatch.cpp in Sources */,
 				763104C620BC1B5E00927A1E /* CurveTimeline.cpp in Sources */,
 				763104E120BC1B5E00927A1E /* AttachmentTimeline.cpp in Sources */,
 				763104ED20BC1B5E00927A1E /* EventData.cpp in Sources */,
@@ -867,7 +892,6 @@
 				76AAA3C11D180F7C00C54FCB /* BatchingExample.cpp in Sources */,
 				763104D520BC1B5E00927A1E /* SkeletonData.cpp in Sources */,
 				763104D620BC1B5E00927A1E /* Extension.cpp in Sources */,
-				76AAA40F1D18106000C54FCB /* SkeletonBatch.cpp in Sources */,
 				763104C920BC1B5E00927A1E /* EventTimeline.cpp in Sources */,
 				763104EB20BC1B5E00927A1E /* VertexEffect.cpp in Sources */,
 				76AAA3C31D180F7C00C54FCB /* RaptorExample.cpp in Sources */,
@@ -876,6 +900,7 @@
 				763104E720BC1B5E00927A1E /* PathAttachment.cpp in Sources */,
 				763104F820BC1B5E00927A1E /* Json.cpp in Sources */,
 				763104F620BC1B5E00927A1E /* SlotData.cpp in Sources */,
+				76D28ACB239FAF0B00FB142D /* SkeletonTwoColorBatch.cpp in Sources */,
 				763104DF20BC1B5E00927A1E /* AttachmentLoader.cpp in Sources */,
 				76AAA3C01D180F7C00C54FCB /* AppDelegate.cpp in Sources */,
 				763104C420BC1B5E00927A1E /* PathConstraint.cpp in Sources */,
@@ -910,11 +935,10 @@
 				763104FB20BC1B5E00927A1E /* DeformTimeline.cpp in Sources */,
 				503AE10217EB989F00D1A890 /* RootViewController.mm in Sources */,
 				503AE10117EB989F00D1A890 /* main.m in Sources */,
-				76A45BDE1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */,
+				76F1083B239FC8DA005B0CE9 /* SkeletonBatch.cpp in Sources */,
 				763104CC20BC1B5E00927A1E /* RTTI.cpp in Sources */,
 				763104F020BC1B5E00927A1E /* Timeline.cpp in Sources */,
 				763104FE20BC1B5E00927A1E /* ShearTimeline.cpp in Sources */,
-				76AAA4101D18106000C54FCB /* SkeletonRenderer.cpp in Sources */,
 				763104F120BC1B5E00927A1E /* AtlasAttachmentLoader.cpp in Sources */,
 				763104EC20BC1B5E00927A1E /* AnimationStateData.cpp in Sources */,
 				763104CE20BC1B5E00927A1E /* PointAttachment.cpp in Sources */,
@@ -925,6 +949,7 @@
 				763104CA20BC1B5E00927A1E /* PathConstraintSpacingTimeline.cpp in Sources */,
 				76D520E61EB362DD00572471 /* CoinExample.cpp in Sources */,
 				763104E220BC1B5E00927A1E /* Updatable.cpp in Sources */,
+				763A8A98239FDC0400FBEDDC /* SkeletonRenderer.cpp in Sources */,
 				763104D220BC1B5E00927A1E /* RotateTimeline.cpp in Sources */,
 				763104E320BC1B5E00927A1E /* RegionAttachment.cpp in Sources */,
 			);
@@ -934,6 +959,8 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				76D28ACE239FAF2C00FB142D /* SkeletonBatch.cpp in Sources */,
+				76D28AD0239FAF2C00FB142D /* SkeletonTwoColorBatch.cpp in Sources */,
 				767D80E422B2A003000BD703 /* MixAndMatchExample.cpp in Sources */,
 				76798D1E22A95AEF00F77964 /* ConstraintData.cpp in Sources */,
 				7631059E20BC1B9700927A1E /* Animation.cpp in Sources */,
@@ -1014,13 +1041,8 @@
 				76AAA4471D1811B000C54FCB /* SpineboyExample.h in Sources */,
 				76AAA4121D18119F00C54FCB /* AttachmentVertices.cpp in Sources */,
 				76AAA4131D18119F00C54FCB /* AttachmentVertices.h in Sources */,
-				76A45BDF1E64396800745AA1 /* SkeletonTwoColorBatch.cpp in Sources */,
 				76AAA4161D18119F00C54FCB /* SkeletonAnimation.cpp in Sources */,
 				76AAA4171D18119F00C54FCB /* SkeletonAnimation.h in Sources */,
-				76AAA4181D18119F00C54FCB /* SkeletonBatch.cpp in Sources */,
-				76AAA4191D18119F00C54FCB /* SkeletonBatch.h in Sources */,
-				76AAA41A1D18119F00C54FCB /* SkeletonRenderer.cpp in Sources */,
-				76AAA41B1D18119F00C54FCB /* SkeletonRenderer.h in Sources */,
 				76AAA41C1D18119F00C54FCB /* spine-cocos2dx.cpp in Sources */,
 				76AAA41D1D18119F00C54FCB /* spine-cocos2dx.h in Sources */,
 				503AE10517EB98FF00D1A890 /* main.cpp in Sources */,

+ 1 - 1
spine-cocos2dx/src/spine/SkeletonAnimation.h

@@ -31,7 +31,7 @@
 #define SPINE_SKELETONANIMATION_H_
 
 #include <spine/spine.h>
-#include <spine/SkeletonRenderer.h>
+#include <spine/spine-cocos2dx.h>
 #include "cocos2d.h"
 
 namespace spine {

+ 91 - 30
spine-cocos2dx/src/spine/SkeletonRenderer.cpp

@@ -28,10 +28,7 @@
  *****************************************************************************/
 
 #include <spine/spine-cocos2dx.h>
-#include <spine/SkeletonRenderer.h>
 #include <spine/Extension.h>
-#include <spine/SkeletonBatch.h>
-#include <spine/SkeletonTwoColorBatch.h>
 #include <spine/AttachmentVertices.h>
 #include <algorithm>
 
@@ -46,7 +43,7 @@ namespace spine {
 		int computeTotalCoordCount(Skeleton& skeleton, int startSlotIndex, int endSlotIndex);
 		cocos2d::Rect computeBoundingRect(const float* coords, int vertexCount);
 		void interleaveCoordinates(float* dst, const float* src, int vertexCount, int dstStride);
-		BlendFunc makeBlendFunc(int blendMode, bool premultipliedAlpha);
+		BlendFunc makeBlendFunc(BlendMode blendMode, bool premultipliedAlpha);
 		void transformWorldVertices(float* dstCoord, int coordCount, Skeleton& skeleton, int startSlotIndex, int endSlotIndex);
 		bool cullRectangle(Renderer* renderer, const Mat4& transform, const cocos2d::Rect& rect);
 			Color4B ColorToColor4B(const Color& color);
@@ -96,7 +93,7 @@ namespace spine {
 		_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
 		setOpacityModifyRGB(true);
 
-		setupGLProgramState(false);
+		setTwoColorTint(false);
 
 		_skeleton->setToSetupPose();
 		_skeleton->updateWorldTransform();
@@ -104,7 +101,9 @@ namespace spine {
 
 	void SkeletonRenderer::setupGLProgramState (bool twoColorTintEnabled) {
 		if (twoColorTintEnabled) {
+#if COCOS2D_VERSION < 0x00040000
 			setGLProgramState(SkeletonTwoColorBatch::getInstance()->getTwoColorTintProgramState());
+#endif
 			return;
 		}
 
@@ -128,7 +127,9 @@ namespace spine {
 				break;
 			}
 		}
+#if COCOS2D_VERSION < 0x00040000
 		setGLProgramState(GLProgramState::getOrCreateWithGLProgramName(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP, texture));
+#endif
 	}
 
 	void SkeletonRenderer::setSkeletonData (SkeletonData *skeletonData, bool ownsSkeletonData) {
@@ -137,34 +138,34 @@ namespace spine {
 	}
 
 	SkeletonRenderer::SkeletonRenderer ()
-		: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _timeScale(1), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
+		: _atlas(nullptr), _attachmentLoader(nullptr), _timeScale(1), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
 	}
 
 	SkeletonRenderer::SkeletonRenderer(Skeleton* skeleton, bool ownsSkeleton, bool ownsSkeletonData, bool ownsAtlas)
-		: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _timeScale(1), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
+		: _atlas(nullptr), _attachmentLoader(nullptr), _timeScale(1), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false),  _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
 		initWithSkeleton(skeleton, ownsSkeleton, ownsSkeletonData, ownsAtlas);
 	}
 
 	SkeletonRenderer::SkeletonRenderer (SkeletonData *skeletonData, bool ownsSkeletonData)
-		: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _timeScale(1), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
+		: _atlas(nullptr), _attachmentLoader(nullptr), _timeScale(1), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
 		initWithData(skeletonData, ownsSkeletonData);
 	}
 
 	SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, Atlas* atlas, float scale)
-		: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _timeScale(1), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
+		: _atlas(nullptr), _attachmentLoader(nullptr), _timeScale(1), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
 		initWithJsonFile(skeletonDataFile, atlas, scale);
 	}
 
 	SkeletonRenderer::SkeletonRenderer (const std::string& skeletonDataFile, const std::string& atlasFile, float scale)
-		: _atlas(nullptr), _attachmentLoader(nullptr), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _timeScale(1), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
+		: _atlas(nullptr), _attachmentLoader(nullptr), _timeScale(1), _debugSlots(false), _debugBones(false), _debugMeshes(false), _debugBoundingRect(false), _effect(nullptr), _startSlotIndex(0), _endSlotIndex(std::numeric_limits<int>::max()) {
 		initWithJsonFile(skeletonDataFile, atlasFile, scale);
 	}
 
 	SkeletonRenderer::~SkeletonRenderer () {
 		if (_ownsSkeletonData) delete _skeleton->getData();
 		if (_ownsSkeleton) delete _skeleton;
-		if (_ownsAtlas) delete _atlas;
-		delete _attachmentLoader;
+		if (_ownsAtlas && _atlas) delete _atlas;
+		if (_attachmentLoader) delete _attachmentLoader;
 		delete _clipper;
 	}
 
@@ -270,7 +271,7 @@ namespace spine {
 		#if CC_USE_CULLING
 		const cocos2d::Rect bb = computeBoundingRect(worldCoords, coordCount / 2);
 
-		if (cullRectangle(renderer, transform, bb)) {			
+		if (cullRectangle(renderer, transform, bb)) {
 			VLA_FREE(worldCoords);
 			return;
 		}
@@ -450,7 +451,11 @@ namespace spine {
 					batch->allocateIndices(triangles.indexCount);
 					memcpy(triangles.indices, _clipper->getClippedTriangles().buffer(), sizeof(unsigned short) * _clipper->getClippedTriangles().size());
 
+#if COCOS2D_VERSION < 0x00040000
 					cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags);
+#else
+					cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, blendFunc, triangles, transform, transformFlags);
+#endif
 
 					const float* verts = _clipper->getClippedVertices().buffer();
 					const float* uvs = _clipper->getClippedUVs().buffer();
@@ -478,8 +483,11 @@ namespace spine {
 					}
 				} else {
 					// Not clipping
-
+#if COCOS2D_VERSION < 0x00040000
 					cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, _glProgramState, blendFunc, triangles, transform, transformFlags);
+#else
+					cocos2d::TrianglesCommand* batchedTriangles = batch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, blendFunc, triangles, transform, transformFlags);
+#endif
 
 					if (_effect) {
 						V3F_C4B_T2F* vertex = batchedTriangles->getTriangles().verts;
@@ -514,7 +522,11 @@ namespace spine {
 					trianglesTwoColor.indices = twoColorBatch->allocateIndices(trianglesTwoColor.indexCount);
 					memcpy(trianglesTwoColor.indices, _clipper->getClippedTriangles().buffer(), sizeof(unsigned short) * _clipper->getClippedTriangles().size());
 
+#if COCOS2D_VERSION < 0x00040000
 					TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags);
+#else
+					TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, blendFunc, trianglesTwoColor, transform, transformFlags);
+#endif
 
 					const float* verts = _clipper->getClippedVertices().buffer();
 					const float* uvs = _clipper->getClippedUVs().buffer();
@@ -544,7 +556,12 @@ namespace spine {
 						}
 					}
 				} else {
+					
+#if COCOS2D_VERSION < 0x00040000
 					TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture->getName(), _glProgramState, blendFunc, trianglesTwoColor, transform, transformFlags);
+#else
+					TwoColorTrianglesCommand* batchedTriangles = lastTwoColorTrianglesCommand = twoColorBatch->addCommand(renderer, _globalZOrder, attachmentVertices->_texture, blendFunc, trianglesTwoColor, transform, transformFlags);
+#endif
 
 					if (_effect) {
 						V3F_C4B_C4B_T2F* vertex = batchedTriangles->getTriangles().verts;
@@ -564,7 +581,7 @@ namespace spine {
 					}
 				}
 			}
-		_clipper->clipEnd(*slot);
+			_clipper->clipEnd(*slot);
 		}
 		_clipper->clipEnd();
 
@@ -617,17 +634,21 @@ namespace spine {
 
 	void SkeletonRenderer::drawDebug (Renderer* renderer, const Mat4 &transform, uint32_t transformFlags) {
 
-	 #if !defined(USE_MATRIX_STACK_PROJECTION_ONLY)
+#if !defined(USE_MATRIX_STACK_PROJECTION_ONLY)
 		Director* director = Director::getInstance();
 		director->pushMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
 		director->loadMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW, transform);
-	#endif
+#endif
 
 		DrawNode* drawNode = DrawNode::create();
 
 		// Draw bounding rectangle
 		if (_debugBoundingRect) {
+#if COCOS2D_VERSION < 0x00040000
 			glLineWidth(2);
+#else
+			drawNode->setLineWidth(2.0f);
+#endif
 			const cocos2d::Rect brect = getBoundingBox();
 			const Vec2 points[4] =
 			{
@@ -642,7 +663,11 @@ namespace spine {
 		if (_debugSlots) {
 			// Slots.
 			// DrawPrimitives::setDrawColor4B(0, 0, 255, 255);
-			glLineWidth(1);
+#if COCOS2D_VERSION < 0x00040000
+			glLineWidth(2);
+#else
+			drawNode->setLineWidth(2.0f);
+#endif
 			V3F_C4B_T2F_Quad quad;
 			for (int i = 0, n = _skeleton->getSlots().size(); i < n; i++) {
 				Slot* slot = _skeleton->getDrawOrder()[i];
@@ -670,7 +695,11 @@ namespace spine {
 
 		if (_debugBones) {
 			// Bone lengths.
+#if COCOS2D_VERSION < 0x00040000
 			glLineWidth(2);
+#else
+			drawNode->setLineWidth(2.0f);
+#endif
 			for (int i = 0, n = _skeleton->getBones().size(); i < n; i++) {
 				Bone *bone = _skeleton->getBones()[i];
 				if (!bone->isActive()) continue;
@@ -690,7 +719,11 @@ namespace spine {
 
 		if (_debugMeshes) {
 			// Meshes.
-			glLineWidth(1);
+#if COCOS2D_VERSION < 0x00040000
+			glLineWidth(2);
+#else
+			drawNode->setLineWidth(2.0f);
+#endif
 			for (int i = 0, n = _skeleton->getSlots().size(); i < n; ++i) {
 				Slot* slot = _skeleton->getDrawOrder()[i];
 				if (!slot->getBone().isActive()) continue;
@@ -716,9 +749,9 @@ namespace spine {
 		}
 
 		drawNode->draw(renderer, transform, transformFlags);
-	#if !defined(USE_MATRIX_STACK_PROJECTION_ONLY)
+#if !defined(USE_MATRIX_STACK_PROJECTION_ONLY)
 		director->popMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_MODELVIEW);
-	#endif
+#endif
 	}
 
 	cocos2d::Rect SkeletonRenderer::getBoundingBox () const {
@@ -777,11 +810,18 @@ namespace spine {
 	}
 
 	void SkeletonRenderer::setTwoColorTint(bool enabled) {
+#if COCOS2D_VERSION > 0x00040000
+		_twoColorTint = enabled;
+#endif
 		setupGLProgramState(enabled);
 	}
 
 	bool SkeletonRenderer::isTwoColorTint() {
+#if COCOS2D_VERSION < 0x00040000
 		return getGLProgramState() == SkeletonTwoColorBatch::getInstance()->getTwoColorTintProgramState();
+#else
+		return _twoColorTint;
+#endif
 	}
 
 	void SkeletonRenderer::setVertexEffect(VertexEffect *effect) {
@@ -834,17 +874,17 @@ namespace spine {
 	}
 
 	void SkeletonRenderer::onEnter () {
-	#if CC_ENABLE_SCRIPT_BINDING
+#if CC_ENABLE_SCRIPT_BINDING
 		if (_scriptType == kScriptTypeJavascript && ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnEnter)) return;
-	#endif
+#endif
 		Node::onEnter();
 		scheduleUpdate();
 	}
 
 	void SkeletonRenderer::onExit () {
-	#if CC_ENABLE_SCRIPT_BINDING
+#if CC_ENABLE_SCRIPT_BINDING
 		if (_scriptType == kScriptTypeJavascript && ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnExit)) return;
-	#endif
+#endif
 		Node::onExit();
 		unscheduleUpdate();
 	}
@@ -923,9 +963,9 @@ namespace spine {
 
 		void transformWorldVertices(float* dstCoord, int coordCount, Skeleton& skeleton, int startSlotIndex, int endSlotIndex) {
 			float* dstPtr = dstCoord;
-	#ifndef NDEBUG
+#ifndef NDEBUG
 			float* const dstEnd = dstCoord + coordCount;
-	#endif
+#endif
 			for (size_t i = 0; i < skeleton.getSlots().size(); ++i) {
 				/*const*/ Slot& slot = *skeleton.getDrawOrder()[i]; // match the draw order of SkeletonRenderer::Draw
 				Attachment* const attachment = slot.getAttachment();
@@ -967,8 +1007,10 @@ namespace spine {
 
 		}
 
-		BlendFunc makeBlendFunc(int blendMode, bool premultipliedAlpha) {
+		BlendFunc makeBlendFunc(BlendMode blendMode, bool premultipliedAlpha) {
 			BlendFunc blendFunc;
+			
+#if COCOS2D_VERSION < 0x00040000
 			switch (blendMode) {
 			case BlendMode_Additive:
 				blendFunc.src = premultipliedAlpha ? GL_ONE : GL_SRC_ALPHA;
@@ -987,13 +1029,32 @@ namespace spine {
 				blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA;
 				break;
 			}
+#else
+			switch (blendMode) {
+				case BlendMode_Additive:
+					blendFunc.src = premultipliedAlpha ? backend::BlendFactor::ONE : backend::BlendFactor::SRC_ALPHA;
+					blendFunc.dst = backend::BlendFactor::ONE;
+					break;
+				case BlendMode_Multiply:
+					blendFunc.src = backend::BlendFactor::DST_COLOR;
+					blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA;
+					break;
+				case BlendMode_Screen:
+					blendFunc.src = backend::BlendFactor::ONE;
+					blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_COLOR;
+					break;
+				default:
+					blendFunc.src = premultipliedAlpha ? backend::BlendFactor::ONE : backend::BlendFactor::SRC_ALPHA;
+					blendFunc.dst = backend::BlendFactor::ONE_MINUS_SRC_ALPHA;
+			}
+#endif
 			return blendFunc;
 		}
 
 
 		bool cullRectangle(Renderer* renderer, const Mat4& transform, const cocos2d::Rect& rect) {
 			if (Camera::getVisitingCamera() == nullptr)
-				return true;
+				return false;
 			
 			auto director = Director::getInstance();
 			auto scene = director->getRunningScene();
@@ -1024,7 +1085,7 @@ namespace spine {
 
 
 		Color4B ColorToColor4B(const Color& color) {
-			return { (GLubyte)(color.r * 255.f), (GLubyte)(color.g * 255.f), (GLubyte)(color.b * 255.f), (GLubyte)(color.a * 255.f) };
+			return { (uint8_t)(color.r * 255.f), (uint8_t)(color.g * 255.f), (uint8_t)(color.b * 255.f), (uint8_t)(color.a * 255.f) };
 		}
 	}
 

+ 2 - 1
spine-cocos2dx/src/spine/SkeletonRenderer.h

@@ -30,8 +30,8 @@
 #ifndef SPINE_SKELETONRENDERER_H_
 #define SPINE_SKELETONRENDERER_H_
 
-#include <spine/spine.h>
 #include "cocos2d.h"
+#include <spine/spine.h>
 
 namespace spine {
 
@@ -157,6 +157,7 @@ namespace spine {
 
 		int _startSlotIndex;
 		int _endSlotIndex;
+		bool _twoColorTint;
 	};
 
 }

+ 49 - 5
spine-cocos2dx/src/spine/spine-cocos2dx.cpp

@@ -66,6 +66,8 @@ static void setAttachmentVertices(MeshAttachment* attachment) {
 Cocos2dAtlasAttachmentLoader::Cocos2dAtlasAttachmentLoader(Atlas* atlas): AtlasAttachmentLoader(atlas) {
 }
 
+Cocos2dAtlasAttachmentLoader::~Cocos2dAtlasAttachmentLoader() { }
+
 void Cocos2dAtlasAttachmentLoader::configureAttachment(Attachment* attachment) {
 	if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
 		setAttachmentVertices((RegionAttachment*)attachment);
@@ -74,6 +76,36 @@ void Cocos2dAtlasAttachmentLoader::configureAttachment(Attachment* attachment) {
 	}
 }
 
+#if COCOS2D_VERSION >= 0x0040000
+
+backend::SamplerAddressMode wrap (TextureWrap wrap) {
+	return wrap ==  TextureWrap_ClampToEdge ? backend::SamplerAddressMode::CLAMP_TO_EDGE : backend::SamplerAddressMode::REPEAT;
+}
+
+backend::SamplerFilter filter (TextureFilter filter) {
+	switch (filter) {
+	case TextureFilter_Unknown:
+		break;
+	case TextureFilter_Nearest:
+		return backend::SamplerFilter::NEAREST;
+	case TextureFilter_Linear:
+		return backend::SamplerFilter::LINEAR;
+	case TextureFilter_MipMap:
+		return backend::SamplerFilter::LINEAR;
+	case TextureFilter_MipMapNearestNearest:
+		return backend::SamplerFilter::NEAREST;
+	case TextureFilter_MipMapLinearNearest:
+        return backend::SamplerFilter::NEAREST;
+	case TextureFilter_MipMapNearestLinear:
+        return backend::SamplerFilter::LINEAR;
+	case TextureFilter_MipMapLinearLinear:
+        return backend::SamplerFilter::LINEAR;
+	}
+	return backend::SamplerFilter::LINEAR;
+}
+
+#else
+
 GLuint wrap (TextureWrap wrap) {
 	return wrap ==  TextureWrap_ClampToEdge ? GL_CLAMP_TO_EDGE : GL_REPEAT;
 }
@@ -100,14 +132,23 @@ GLuint filter (TextureFilter filter) {
 	return GL_LINEAR;
 }
 
+#endif
+
+Cocos2dTextureLoader::Cocos2dTextureLoader() : TextureLoader() { }
+Cocos2dTextureLoader::~Cocos2dTextureLoader() { }
+
 void Cocos2dTextureLoader::load(AtlasPage& page, const spine::String& path) {
 	Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(path.buffer());
 	CCASSERT(texture != nullptr, "Invalid image");
-	if (texture)
-	{
+	if (texture) {
 		texture->retain();
-		Texture2D::TexParams textureParams = { filter(page.minFilter), filter(page.magFilter), wrap(page.uWrap), wrap(page.vWrap) };
+#if COCOS2D_VERSION >= 0x0040000
+		Texture2D::TexParams textureParams(filter(page.minFilter), filter(page.magFilter), wrap(page.uWrap), wrap(page.vWrap));
+#else
+		Texture2D::TexParams textureParams = {filter(page.minFilter), filter(page.magFilter), wrap(page.uWrap), wrap(page.vWrap)};
+#endif
 		texture->setTexParameters(textureParams);
+
 		page.setRendererObject(texture);
 		page.width = texture->getPixelsWide();
 		page.height = texture->getPixelsHigh();
@@ -115,13 +156,16 @@ void Cocos2dTextureLoader::load(AtlasPage& page, const spine::String& path) {
 }
 
 void Cocos2dTextureLoader::unload(void* texture) {
-	if (texture)
-	{
+	if (texture) {
 		((Texture2D*)texture)->release();
 	}
 }
 
 
+Cocos2dExtension::Cocos2dExtension() : DefaultSpineExtension() { }
+
+Cocos2dExtension::~Cocos2dExtension() { }
+
 char *Cocos2dExtension::_readFile(const spine::String &path, int *length) {
 	Data data = FileUtils::getInstance()->getDataFromFile(FileUtils::getInstance()->fullPathForFilename(path.buffer()));
 	if (data.isNull()) return nullptr;

+ 18 - 3
spine-cocos2dx/src/spine/spine-cocos2dx.h

@@ -34,19 +34,31 @@
 #include "cocos2d.h"
 
 #include <spine/SkeletonRenderer.h>
+
+#if COCOS2D_VERSION < 0x00040000
+#include <spine/v3/SkeletonBatch.h>
+#include <spine/v3/SkeletonTwoColorBatch.h>
+#else
+#include <spine/v4/SkeletonBatch.h>
+#include <spine/v4/SkeletonTwoColorBatch.h>
+#endif
+
 #include <spine/SkeletonAnimation.h>
-#include <spine/SkeletonBatch.h>
 
 namespace spine {
 	class Cocos2dAtlasAttachmentLoader: public AtlasAttachmentLoader {
 	public:
 		Cocos2dAtlasAttachmentLoader(Atlas* atlas);
+		virtual ~Cocos2dAtlasAttachmentLoader();
 		virtual void configureAttachment(Attachment* attachment);
 	};
 
 	class Cocos2dTextureLoader: public TextureLoader {
 	public:
-
+		Cocos2dTextureLoader();
+		
+		virtual ~Cocos2dTextureLoader();
+		
 		virtual void load(AtlasPage& page, const String& path);
 
 		virtual void unload(void* texture);
@@ -54,7 +66,10 @@ namespace spine {
 
 	class Cocos2dExtension: public DefaultSpineExtension {
 	public:
-
+		Cocos2dExtension();
+		
+		virtual ~Cocos2dExtension();
+		
 	protected:
 		virtual char *_readFile(const String &path, int *length);
 	};

+ 156 - 151
spine-cocos2dx/src/spine/SkeletonBatch.cpp → spine-cocos2dx/src/spine/v3/SkeletonBatch.cpp

@@ -1,151 +1,156 @@
-/******************************************************************************
- * Spine Runtimes License Agreement
- * Last updated May 1, 2019. Replaces all prior versions.
- *
- * Copyright (c) 2013-2019, Esoteric Software LLC
- *
- * Integration of the Spine Runtimes into software or otherwise creating
- * derivative works of the Spine Runtimes is permitted under the terms and
- * conditions of Section 2 of the Spine Editor License Agreement:
- * http://esotericsoftware.com/spine-editor-license
- *
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
- * or otherwise create derivative works of the Spine Runtimes (collectively,
- * "Products"), provided that each user of the Products must obtain their own
- * Spine Editor license and redistribution of the Products in any form must
- * include this license and copyright notice.
- *
- * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 LLC 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.
- *****************************************************************************/
-
-#include <spine/SkeletonBatch.h>
-#include <spine/Extension.h>
-#include <algorithm>
-
-USING_NS_CC;
-#define EVENT_AFTER_DRAW_RESET_POSITION "director_after_draw"
-using std::max;
-#define INITIAL_SIZE (10000)
-
-namespace spine {
-
-static SkeletonBatch* instance = nullptr;
-
-SkeletonBatch* SkeletonBatch::getInstance () {
-	if (!instance) instance = new SkeletonBatch();
-	return instance;
-}
-
-void SkeletonBatch::destroyInstance () {
-	if (instance) {
-		delete instance;
-		instance = nullptr;
-	}
-}
-
-SkeletonBatch::SkeletonBatch () {
-	for (unsigned int i = 0; i < INITIAL_SIZE; i++) {
-		_commandsPool.push_back(new TrianglesCommand());
-	}
-
-	reset ();
-
-	// callback after drawing is finished so we can clear out the batch state
-	// for the next frame
-	Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_AFTER_DRAW_RESET_POSITION, [this](EventCustom* eventCustom){
-		this->update(0);
-	});;
-}
-
-SkeletonBatch::~SkeletonBatch () {
-	Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION);
-
-	for (unsigned int i = 0; i < _commandsPool.size(); i++) {
-		delete _commandsPool[i];
-		_commandsPool[i] = nullptr;
-	}
-}
-
-void SkeletonBatch::update (float delta) {
-	reset();
-}
-
-cocos2d::V3F_C4B_T2F* SkeletonBatch::allocateVertices(uint32_t numVertices) {
-	if (_vertices.size() - _numVertices < numVertices) {
-		cocos2d::V3F_C4B_T2F* oldData = _vertices.data();
-		_vertices.resize((_vertices.size() + numVertices) * 2 + 1);
-		cocos2d::V3F_C4B_T2F* newData = _vertices.data();
-		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
-			TrianglesCommand* command = _commandsPool[i];
-			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
-			triangles.verts = newData + (triangles.verts - oldData);
-		}
-	}
-
-	cocos2d::V3F_C4B_T2F* vertices = _vertices.data() + _numVertices;
-	_numVertices += numVertices;
-	return vertices;
-}
-
-void SkeletonBatch::deallocateVertices(uint32_t numVertices) {
-	_numVertices -= numVertices;
-}
-
-
-unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) {
-	if (_indices.getCapacity() - _indices.size() < numIndices) {
-		unsigned short* oldData = _indices.buffer();
-		int oldSize = _indices.size();
-		_indices.ensureCapacity(_indices.size() + numIndices);
-		unsigned short* newData = _indices.buffer();
-		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
-			TrianglesCommand* command = _commandsPool[i];
-			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
-			if (triangles.indices >= oldData && triangles.indices < oldData + oldSize) {
-				triangles.indices = newData + (triangles.indices - oldData);
-			}
-		}
-	}
-
-	unsigned short* indices = _indices.buffer() + _indices.size();
-	_indices.setSize(_indices.size() + numIndices, 0);
-	return indices;
-}
-
-void SkeletonBatch::deallocateIndices(uint32_t numIndices) {
-	_indices.setSize(_indices.size() - numIndices, 0);
-}
-
-
-cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) {
-	TrianglesCommand* command = nextFreeCommand();
-	command->init(globalOrder, texture, glProgramState, blendType, triangles, mv, flags);
-	renderer->addCommand(command);
-	return command;
-}
-
-void SkeletonBatch::reset() {
-	_nextFreeCommand = 0;
-	_numVertices = 0;
-	_indices.setSize(0, 0);
-}
-
-cocos2d::TrianglesCommand* SkeletonBatch::nextFreeCommand() {
-	if (_commandsPool.size() <= _nextFreeCommand) {
-		unsigned int newSize = _commandsPool.size() * 2 + 1;
-		for (int i = _commandsPool.size(); i < newSize; i++) {
-			_commandsPool.push_back(new TrianglesCommand());
-		}
-	}
-	return _commandsPool[_nextFreeCommand++];
-}
-}
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated May 1, 2019. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2019, Esoteric Software LLC
+ *
+ * Integration of the Spine Runtimes into software or otherwise creating
+ * derivative works of the Spine Runtimes is permitted under the terms and
+ * conditions of Section 2 of the Spine Editor License Agreement:
+ * http://esotericsoftware.com/spine-editor-license
+ *
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
+ * "Products"), provided that each user of the Products must obtain their own
+ * Spine Editor license and redistribution of the Products in any form must
+ * include this license and copyright notice.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 LLC 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.
+ *****************************************************************************/
+
+#include <spine/spine-cocos2dx.h>
+#if COCOS2D_VERSION < 0x00040000
+
+#include <spine/Extension.h>
+#include <algorithm>
+
+USING_NS_CC;
+#define EVENT_AFTER_DRAW_RESET_POSITION "director_after_draw"
+using std::max;
+#define INITIAL_SIZE (10000)
+
+namespace spine {
+
+static SkeletonBatch* instance = nullptr;
+
+SkeletonBatch* SkeletonBatch::getInstance () {
+	if (!instance) instance = new SkeletonBatch();
+	return instance;
+}
+
+void SkeletonBatch::destroyInstance () {
+	if (instance) {
+		delete instance;
+		instance = nullptr;
+	}
+}
+
+SkeletonBatch::SkeletonBatch () {
+	for (unsigned int i = 0; i < INITIAL_SIZE; i++) {
+		_commandsPool.push_back(new TrianglesCommand());
+	}
+
+	reset ();
+
+	// callback after drawing is finished so we can clear out the batch state
+	// for the next frame
+	Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_AFTER_DRAW_RESET_POSITION, [this](EventCustom* eventCustom){
+		this->update(0);
+	});;
+}
+
+SkeletonBatch::~SkeletonBatch () {
+	Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION);
+
+	for (unsigned int i = 0; i < _commandsPool.size(); i++) {
+		delete _commandsPool[i];
+		_commandsPool[i] = nullptr;
+	}
+}
+
+void SkeletonBatch::update (float delta) {
+	reset();
+}
+
+cocos2d::V3F_C4B_T2F* SkeletonBatch::allocateVertices(uint32_t numVertices) {
+	if (_vertices.size() - _numVertices < numVertices) {
+		cocos2d::V3F_C4B_T2F* oldData = _vertices.data();
+		_vertices.resize((_vertices.size() + numVertices) * 2 + 1);
+		cocos2d::V3F_C4B_T2F* newData = _vertices.data();
+		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
+			TrianglesCommand* command = _commandsPool[i];
+			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
+			triangles.verts = newData + (triangles.verts - oldData);
+		}
+	}
+
+	cocos2d::V3F_C4B_T2F* vertices = _vertices.data() + _numVertices;
+	_numVertices += numVertices;
+	return vertices;
+}
+
+void SkeletonBatch::deallocateVertices(uint32_t numVertices) {
+	_numVertices -= numVertices;
+}
+
+
+unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) {
+	if (_indices.getCapacity() - _indices.size() < numIndices) {
+		unsigned short* oldData = _indices.buffer();
+		int oldSize = _indices.size();
+		_indices.ensureCapacity(_indices.size() + numIndices);
+		unsigned short* newData = _indices.buffer();
+		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
+			TrianglesCommand* command = _commandsPool[i];
+			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
+			if (triangles.indices >= oldData && triangles.indices < oldData + oldSize) {
+				triangles.indices = newData + (triangles.indices - oldData);
+			}
+		}
+	}
+
+	unsigned short* indices = _indices.buffer() + _indices.size();
+	_indices.setSize(_indices.size() + numIndices, 0);
+	return indices;
+}
+
+void SkeletonBatch::deallocateIndices(uint32_t numIndices) {
+	_indices.setSize(_indices.size() - numIndices, 0);
+}
+
+
+cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) {
+	TrianglesCommand* command = nextFreeCommand();
+	command->init(globalOrder, texture, glProgramState, blendType, triangles, mv, flags);
+	renderer->addCommand(command);
+	return command;
+}
+
+void SkeletonBatch::reset() {
+	_nextFreeCommand = 0;
+	_numVertices = 0;
+	_indices.setSize(0, 0);
+}
+
+cocos2d::TrianglesCommand* SkeletonBatch::nextFreeCommand() {
+	if (_commandsPool.size() <= _nextFreeCommand) {
+		unsigned int newSize = _commandsPool.size() * 2 + 1;
+		for (int i = _commandsPool.size(); i < newSize; i++) {
+			_commandsPool.push_back(new TrianglesCommand());
+		}
+	}
+	return _commandsPool[_nextFreeCommand++];
+}
+}
+
+#endif
+

+ 79 - 75
spine-cocos2dx/src/spine/SkeletonBatch.h → spine-cocos2dx/src/spine/v3/SkeletonBatch.h

@@ -1,75 +1,79 @@
-/******************************************************************************
- * Spine Runtimes License Agreement
- * Last updated May 1, 2019. Replaces all prior versions.
- *
- * Copyright (c) 2013-2019, Esoteric Software LLC
- *
- * Integration of the Spine Runtimes into software or otherwise creating
- * derivative works of the Spine Runtimes is permitted under the terms and
- * conditions of Section 2 of the Spine Editor License Agreement:
- * http://esotericsoftware.com/spine-editor-license
- *
- * Otherwise, it is permitted to integrate the Spine Runtimes into software
- * or otherwise create derivative works of the Spine Runtimes (collectively,
- * "Products"), provided that each user of the Products must obtain their own
- * Spine Editor license and redistribution of the Products in any form must
- * include this license and copyright notice.
- *
- * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 LLC 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_SKELETONBATCH_H_
-#define SPINE_SKELETONBATCH_H_
-
-#include <spine/spine.h>
-#include "cocos2d.h"
-#include <vector>
-
-namespace spine {
-
-	class SkeletonBatch {
-	public:
-		static SkeletonBatch* getInstance ();
-
-		static void destroyInstance ();
-
-		void update (float delta);
-
-		cocos2d::V3F_C4B_T2F* allocateVertices(uint32_t numVertices);
-		void deallocateVertices(uint32_t numVertices);
-		unsigned short* allocateIndices(uint32_t numIndices);
-		void deallocateIndices(uint32_t numVertices);
-		cocos2d::TrianglesCommand* addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags);
-
-	protected:
-		SkeletonBatch ();
-		virtual ~SkeletonBatch ();
-
-		void reset ();
-
-		cocos2d::TrianglesCommand* nextFreeCommand ();
-
-		// pool of commands
-		std::vector<cocos2d::TrianglesCommand*> _commandsPool;
-		uint32_t _nextFreeCommand;
-
-		// pool of vertices
-		std::vector<cocos2d::V3F_C4B_T2F> _vertices;
-		uint32_t _numVertices;
-
-		// pool of indices
-		Vector<unsigned short> _indices;
-	};
-
-}
-
-#endif // SPINE_SKELETONBATCH_H_
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated May 1, 2019. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2019, Esoteric Software LLC
+ *
+ * Integration of the Spine Runtimes into software or otherwise creating
+ * derivative works of the Spine Runtimes is permitted under the terms and
+ * conditions of Section 2 of the Spine Editor License Agreement:
+ * http://esotericsoftware.com/spine-editor-license
+ *
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
+ * "Products"), provided that each user of the Products must obtain their own
+ * Spine Editor license and redistribution of the Products in any form must
+ * include this license and copyright notice.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 LLC 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_SKELETONBATCH_H_
+#define SPINE_SKELETONBATCH_H_
+
+#include "cocos2d.h"
+#if COCOS2D_VERSION < 0x00040000
+
+#include <spine/spine.h>
+#include <vector>
+
+namespace spine {
+
+	class SkeletonBatch {
+	public:
+		static SkeletonBatch* getInstance ();
+
+		static void destroyInstance ();
+
+		void update (float delta);
+
+		cocos2d::V3F_C4B_T2F* allocateVertices(uint32_t numVertices);
+		void deallocateVertices(uint32_t numVertices);
+		unsigned short* allocateIndices(uint32_t numIndices);
+		void deallocateIndices(uint32_t numVertices);
+		cocos2d::TrianglesCommand* addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::GLProgramState* glProgramState, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags);
+
+	protected:
+		SkeletonBatch ();
+		virtual ~SkeletonBatch ();
+
+		void reset ();
+
+		cocos2d::TrianglesCommand* nextFreeCommand ();
+
+		// pool of commands
+		std::vector<cocos2d::TrianglesCommand*> _commandsPool;
+		uint32_t _nextFreeCommand;
+
+		// pool of vertices
+		std::vector<cocos2d::V3F_C4B_T2F> _vertices;
+		uint32_t _numVertices;
+
+		// pool of indices
+		Vector<unsigned short> _indices;
+	};
+
+}
+
+#endif
+
+#endif // SPINE_SKELETONBATCH_H_

+ 5 - 1
spine-cocos2dx/src/spine/SkeletonTwoColorBatch.cpp → spine-cocos2dx/src/spine/v3/SkeletonTwoColorBatch.cpp

@@ -27,7 +27,9 @@
  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include <spine/SkeletonTwoColorBatch.h>
+#include <spine/spine-cocos2dx.h>
+#if COCOS2D_VERSION < 0x00040000
+
 #include <spine/Extension.h>
 #include <algorithm>
 
@@ -345,3 +347,5 @@ TwoColorTrianglesCommand* SkeletonTwoColorBatch::nextFreeCommand() {
 	return command;
 }
 }
+
+#endif

+ 5 - 1
spine-cocos2dx/src/spine/SkeletonTwoColorBatch.h → spine-cocos2dx/src/spine/v3/SkeletonTwoColorBatch.h

@@ -30,8 +30,10 @@
 #ifndef SPINE_SKELETONTWOCOLORBATCH_H_
 #define SPINE_SKELETONTWOCOLORBATCH_H_
 
-#include <spine/spine.h>
 #include "cocos2d.h"
+#if COCOS2D_VERSION < 0x00040000
+
+#include <spine/spine.h>
 #include <vector>
 
 namespace spine {
@@ -165,4 +167,6 @@ namespace spine {
 	};
 }
 
+#endif
+
 #endif // SPINE_SKELETONTWOCOLORBATCH_H_

+ 193 - 0
spine-cocos2dx/src/spine/v4/SkeletonBatch.cpp

@@ -0,0 +1,193 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated May 1, 2019. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2019, Esoteric Software LLC
+ *
+ * Integration of the Spine Runtimes into software or otherwise creating
+ * derivative works of the Spine Runtimes is permitted under the terms and
+ * conditions of Section 2 of the Spine Editor License Agreement:
+ * http://esotericsoftware.com/spine-editor-license
+ *
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software
+ * or otherwise create derivative works of the Spine Runtimes (collectively,
+ * "Products"), provided that each user of the Products must obtain their own
+ * Spine Editor license and redistribution of the Products in any form must
+ * include this license and copyright notice.
+ *
+ * THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "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 LLC 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.
+ *****************************************************************************/
+
+#include <spine/spine-cocos2dx.h>
+#if COCOS2D_VERSION >= 0x00040000
+
+#include <spine/Extension.h>
+#include <algorithm>
+
+USING_NS_CC;
+#define EVENT_AFTER_DRAW_RESET_POSITION "director_after_draw"
+using std::max;
+#define INITIAL_SIZE (10000)
+
+#include "renderer/ccShaders.h"
+#include "renderer/backend/Device.h"
+
+namespace spine {
+
+static SkeletonBatch* instance = nullptr;
+
+SkeletonBatch* SkeletonBatch::getInstance () {
+	if (!instance) instance = new SkeletonBatch();
+	return instance;
+}
+
+void SkeletonBatch::destroyInstance () {
+	if (instance) {
+		delete instance;
+		instance = nullptr;
+	}
+}
+
+SkeletonBatch::SkeletonBatch () {
+
+    auto program = backend::Device::getInstance()->newProgram(positionTextureColor_vert, positionTextureColor_frag);
+    _programState = std::make_shared<backend::ProgramState>(program);
+    program->autorelease();
+
+    auto vertexLayout = _programState->getVertexLayout();
+
+    vertexLayout->setAttribute("a_position", 0, backend::VertexFormat::FLOAT3, offsetof(V3F_C4B_T2F, vertices), false);
+    vertexLayout->setAttribute("a_color", 2, backend::VertexFormat::UBYTE4, offsetof(V3F_C4B_T2F, colors), true);
+    vertexLayout->setAttribute("a_texCoord", 1, backend::VertexFormat::FLOAT2, offsetof(V3F_C4B_T2F, texCoords), false);
+    vertexLayout->setLayout(sizeof(_vertices[0]));
+
+
+    _locMVP = _programState->getUniformLocation("u_MVPMatrix");
+    _locTexture = _programState->getUniformLocation("u_texture");
+
+    for (unsigned int i = 0; i < INITIAL_SIZE; i++) {
+        _commandsPool.push_back(createNewTrianglesCommand());
+    }
+    reset();
+    // callback after drawing is finished so we can clear out the batch state
+    // for the next frame
+    Director::getInstance()->getEventDispatcher()->addCustomEventListener(EVENT_AFTER_DRAW_RESET_POSITION, [this](EventCustom* eventCustom) {
+        this->update(0);
+        });;
+}
+
+SkeletonBatch::~SkeletonBatch () {
+	Director::getInstance()->getEventDispatcher()->removeCustomEventListeners(EVENT_AFTER_DRAW_RESET_POSITION);
+
+	for (unsigned int i = 0; i < _commandsPool.size(); i++) {
+        CC_SAFE_RELEASE(_commandsPool[i]->getPipelineDescriptor().programState);
+		delete _commandsPool[i];
+		_commandsPool[i] = nullptr;
+	}
+}
+
+void SkeletonBatch::update (float delta) {
+	reset();
+}
+
+cocos2d::V3F_C4B_T2F* SkeletonBatch::allocateVertices(uint32_t numVertices) {
+	if (_vertices.size() - _numVertices < numVertices) {
+		cocos2d::V3F_C4B_T2F* oldData = _vertices.data();
+		_vertices.resize((_vertices.size() + numVertices) * 2 + 1);
+		cocos2d::V3F_C4B_T2F* newData = _vertices.data();
+		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
+			TrianglesCommand* command = _commandsPool[i];
+			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
+			triangles.verts = newData + (triangles.verts - oldData);
+		}
+	}
+
+	cocos2d::V3F_C4B_T2F* vertices = _vertices.data() + _numVertices;
+	_numVertices += numVertices;
+	return vertices;
+}
+
+void SkeletonBatch::deallocateVertices(uint32_t numVertices) {
+	_numVertices -= numVertices;
+}
+
+
+unsigned short* SkeletonBatch::allocateIndices(uint32_t numIndices) {
+	if (_indices.getCapacity() - _indices.size() < numIndices) {
+		unsigned short* oldData = _indices.buffer();
+		int oldSize = _indices.size();
+		_indices.ensureCapacity(_indices.size() + numIndices);
+		unsigned short* newData = _indices.buffer();
+		for (uint32_t i = 0; i < this->_nextFreeCommand; i++) {
+			TrianglesCommand* command = _commandsPool[i];
+			cocos2d::TrianglesCommand::Triangles& triangles = (cocos2d::TrianglesCommand::Triangles&)command->getTriangles();
+			if (triangles.indices >= oldData && triangles.indices < oldData + oldSize) {
+				triangles.indices = newData + (triangles.indices - oldData);
+			}
+		}
+	}
+
+	unsigned short* indices = _indices.buffer() + _indices.size();
+	_indices.setSize(_indices.size() + numIndices, 0);
+	return indices;
+}
+
+void SkeletonBatch::deallocateIndices(uint32_t numIndices) {
+	_indices.setSize(_indices.size() - numIndices, 0);
+}
+
+
+cocos2d::TrianglesCommand* SkeletonBatch::addCommand(cocos2d::Renderer* renderer, float globalOrder, cocos2d::Texture2D* texture, cocos2d::BlendFunc blendType, const cocos2d::TrianglesCommand::Triangles& triangles, const cocos2d::Mat4& mv, uint32_t flags) {
+	TrianglesCommand* command = nextFreeCommand();
+    const cocos2d::Mat4& projectionMat = Director::getInstance()->getMatrix(MATRIX_STACK_TYPE::MATRIX_STACK_PROJECTION);    
+
+    auto programState = command->getPipelineDescriptor().programState;
+    CCASSERT(programState, "programState should not be null");
+
+    programState->setUniform(_locMVP, projectionMat.m, sizeof(projectionMat.m));
+    programState->setTexture(_locTexture, 0, texture->getBackendTexture());
+
+    command->init(globalOrder, texture, blendType, triangles, mv, flags);
+    renderer->addCommand(command);
+	return command;
+}
+
+void SkeletonBatch::reset() {
+	_nextFreeCommand = 0;
+	_numVertices = 0;
+	_indices.setSize(0, 0);
+}
+
+cocos2d::TrianglesCommand* SkeletonBatch::nextFreeCommand() {
+    if (_commandsPool.size() <= _nextFreeCommand) {
+        unsigned int newSize = _commandsPool.size() * 2 + 1;
+        for (int i = _commandsPool.size(); i < newSize; i++) {
+            _commandsPool.push_back(createNewTrianglesCommand());
+        }
+    }
+    auto* command = _commandsPool[_nextFreeCommand++];
+    auto& pipelineDescriptor = command->getPipelineDescriptor();
+    if (pipelineDescriptor.programState == nullptr)
+    {
+        CCASSERT(_programState, "programState should not be null");
+        pipelineDescriptor.programState = _programState->clone();
+    }
+    return command;
+}
+
+cocos2d::TrianglesCommand *SkeletonBatch::createNewTrianglesCommand() {
+    auto* command = new TrianglesCommand();
+    return command;
+}
+}
+
+#endif

Vissa filer visades inte eftersom för många filer har ändrats