Эх сурвалжийг харах

[ue4][cpp] Switched to IWYU build for much improved rebuild times.

Cleaned up spine-cpp and removed UE4 specific code.
badlogic 3 жил өмнө
parent
commit
8910c458e8
88 өөрчлөгдсөн 119 нэмэгдсэн , 449 устгасан
  1. 3 1
      spine-cpp/spine-cpp/include/spine/HashMap.h
  2. 4 8
      spine-cpp/spine-cpp/src/spine/Animation.cpp
  3. 3 7
      spine-cpp/spine-cpp/src/spine/AnimationState.cpp
  4. 1 5
      spine-cpp/spine-cpp/src/spine/AnimationStateData.cpp
  5. 1 5
      spine-cpp/spine-cpp/src/spine/Atlas.cpp
  6. 1 5
      spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp
  7. 0 4
      spine-cpp/spine-cpp/src/spine/Attachment.cpp
  8. 0 4
      spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp
  9. 0 4
      spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp
  10. 0 4
      spine-cpp/spine-cpp/src/spine/Bone.cpp
  11. 0 4
      spine-cpp/spine-cpp/src/spine/BoneData.cpp
  12. 0 4
      spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp
  13. 0 4
      spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp
  14. 0 4
      spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp
  15. 0 4
      spine-cpp/spine-cpp/src/spine/ConstraintData.cpp
  16. 1 5
      spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp
  17. 0 4
      spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp
  18. 0 4
      spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp
  19. 0 4
      spine-cpp/spine-cpp/src/spine/Event.cpp
  20. 0 4
      spine-cpp/spine-cpp/src/spine/EventData.cpp
  21. 0 4
      spine-cpp/spine-cpp/src/spine/EventTimeline.cpp
  22. 0 4
      spine-cpp/spine-cpp/src/spine/Extension.cpp
  23. 1 5
      spine-cpp/spine-cpp/src/spine/IkConstraint.cpp
  24. 0 4
      spine-cpp/spine-cpp/src/spine/IkConstraintData.cpp
  25. 0 4
      spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp
  26. 1 5
      spine-cpp/spine-cpp/src/spine/Json.cpp
  27. 0 4
      spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp
  28. 5 5
      spine-cpp/spine-cpp/src/spine/Log.cpp
  29. 1 5
      spine-cpp/spine-cpp/src/spine/MathUtil.cpp
  30. 2 6
      spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp
  31. 0 4
      spine-cpp/spine-cpp/src/spine/PathAttachment.cpp
  32. 4 8
      spine-cpp/spine-cpp/src/spine/PathConstraint.cpp
  33. 0 4
      spine-cpp/spine-cpp/src/spine/PathConstraintData.cpp
  34. 0 4
      spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp
  35. 0 4
      spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp
  36. 0 4
      spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp
  37. 0 4
      spine-cpp/spine-cpp/src/spine/PointAttachment.cpp
  38. 0 4
      spine-cpp/spine-cpp/src/spine/RTTI.cpp
  39. 0 4
      spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp
  40. 0 4
      spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp
  41. 0 4
      spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp
  42. 3 3
      spine-cpp/spine-cpp/src/spine/Sequence.cpp
  43. 2 8
      spine-cpp/spine-cpp/src/spine/SequenceTimeline.cpp
  44. 0 4
      spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp
  45. 1 5
      spine-cpp/spine-cpp/src/spine/Skeleton.cpp
  46. 9 13
      spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp
  47. 1 5
      spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp
  48. 5 9
      spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp
  49. 0 4
      spine-cpp/spine-cpp/src/spine/SkeletonData.cpp
  50. 6 10
      spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp
  51. 2 6
      spine-cpp/spine-cpp/src/spine/Skin.cpp
  52. 0 4
      spine-cpp/spine-cpp/src/spine/Slot.cpp
  53. 0 4
      spine-cpp/spine-cpp/src/spine/SlotData.cpp
  54. 1 5
      spine-cpp/spine-cpp/src/spine/SpineObject.cpp
  55. 0 4
      spine-cpp/spine-cpp/src/spine/TextureLoader.cpp
  56. 0 4
      spine-cpp/spine-cpp/src/spine/Timeline.cpp
  57. 1 5
      spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp
  58. 0 4
      spine-cpp/spine-cpp/src/spine/TransformConstraintData.cpp
  59. 0 4
      spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp
  60. 0 4
      spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp
  61. 7 11
      spine-cpp/spine-cpp/src/spine/Triangulator.cpp
  62. 0 4
      spine-cpp/spine-cpp/src/spine/Updatable.cpp
  63. 3 7
      spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp
  64. 1 5
      spine-cpp/spine-cpp/src/spine/VertexEffect.cpp
  65. 1 0
      spine-ue4/Config/DefaultEngine.ini
  66. 1 7
      spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineAtlasImportFactory.cpp
  67. 1 3
      spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineEditorPlugin.cpp
  68. 0 33
      spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineEditorPluginPrivatePCH.h
  69. 1 8
      spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineSkeletonImportFactory.cpp
  70. 5 10
      spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/SpineEditorPlugin.Build.cs
  71. 1 5
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp
  72. 3 2
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineAtlasAsset.cpp
  73. 3 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneDriverComponent.cpp
  74. 3 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneFollowerComponent.cpp
  75. 1 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePlugin.cpp
  76. 0 38
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePluginPrivatePCH.h
  77. 2 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp
  78. 3 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp
  79. 3 3
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp
  80. 5 3
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp
  81. 6 3
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineWidget.cpp
  82. 1 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineAtlasAsset.h
  83. 1 0
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineBoneFollowerComponent.h
  84. 0 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonDataAsset.h
  85. 2 1
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineWidget.h
  86. 3 8
      spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.Build.cs
  87. 1 0
      spine-ue4/Source/SpineUE4.Target.cs
  88. 2 4
      spine-ue4/Source/SpineUE4Editor.Target.cs

+ 3 - 1
spine-cpp/spine-cpp/include/spine/HashMap.h

@@ -30,13 +30,15 @@
 #ifndef Spine_HashMap_h
 #define Spine_HashMap_h
 
-#include <spine/Extension.h>
 #include <spine/Vector.h>
 #include <spine/SpineObject.h>
 
 // Required for new with line number and file name in MSVC
 #ifdef _MSC_VER
 #pragma warning(disable:4291)
+
+#pragma warning(disable:4251)
+
 #endif
 
 namespace spine {

+ 4 - 8
spine-cpp/spine-cpp/src/spine/Animation.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Animation.h>
 #include <spine/Event.h>
 #include <spine/Skeleton.h>
@@ -98,14 +94,14 @@ void Animation::setDuration(float inValue) {
 int Animation::search(Vector<float> &frames, float target) {
 	size_t n = (int) frames.size();
 	for (size_t i = 1; i < n; i++) {
-		if (frames[i] > target) return i - 1;
+		if (frames[i] > target) return (int)(i - 1);
 	}
-	return n - 1;
+	return (int)(n - 1);
 }
 
 int Animation::search(Vector<float> &frames, float target, int step) {
 	size_t n = frames.size();
 	for (size_t i = step; i < n; i += step)
-		if (frames[i] > target) return i - step;
-	return n - step;
+		if (frames[i] > target) return (int)(i - step);
+	return (int)(n - step);
 }

+ 3 - 7
spine-cpp/spine-cpp/src/spine/AnimationState.cpp

@@ -27,12 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <spine/Animation.h>
 #include <spine/AnimationState.h>
+#include <spine/Animation.h>
 #include <spine/AnimationStateData.h>
 #include <spine/AttachmentTimeline.h>
 #include <spine/Bone.h>
@@ -493,7 +489,7 @@ bool AnimationState::apply(Skeleton &skeleton) {
 
 	int setupState = _unkeyedState + Setup;
 	Vector<Slot *> &slots = skeleton.getSlots();
-	for (int i = 0, n = slots.size(); i < n; i++) {
+	for (int i = 0, n = (int)slots.size(); i < n; i++) {
 		Slot *slot = slots[i];
 		if (slot->getAttachmentState() == setupState) {
 			const String &attachmentName = slot->getData().getAttachmentName();
@@ -955,7 +951,7 @@ TrackEntry *AnimationState::newTrackEntry(size_t trackIndex, Animation *animatio
 	TrackEntry *entryP = _trackEntryPool.obtain();// Pooling
 	TrackEntry &entry = *entryP;
 
-	entry._trackIndex = trackIndex;
+	entry._trackIndex = (int)trackIndex;
 	entry._animation = animation;
 	entry._loop = loop;
 	entry._holdPrevious = 0;

+ 1 - 5
spine-cpp/spine-cpp/src/spine/AnimationStateData.cpp

@@ -27,12 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <spine/Animation.h>
 #include <spine/AnimationStateData.h>
+#include <spine/Animation.h>
 #include <spine/SkeletonData.h>
 
 using namespace spine;

+ 1 - 5
spine-cpp/spine-cpp/src/spine/Atlas.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Atlas.h>
 #include <spine/ContainerUtil.h>
 #include <spine/TextureLoader.h>
@@ -159,7 +155,7 @@ struct SimpleString {
 	}
 
 	bool equals(const char *str) {
-		int otherLen = strlen(str);
+		int otherLen = (int)strlen(str);
 		if (length != otherLen) return false;
 		for (int i = 0; i < length; i++) {
 			if (start[i] != str[i]) return false;

+ 1 - 5
spine-cpp/spine-cpp/src/spine/AtlasAttachmentLoader.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/AtlasAttachmentLoader.h>
 #include <spine/BoundingBoxAttachment.h>
 #include <spine/ClippingAttachment.h>
@@ -50,7 +46,7 @@ namespace spine {
 
 	bool loadSequence(Atlas *atlas, const String &basePath, Sequence *sequence) {
 		Vector<TextureRegion *> &regions = sequence->getRegions();
-		for (int i = 0, n = regions.size(); i < n; i++) {
+		for (int i = 0, n = (int)regions.size(); i < n; i++) {
 			String path = sequence->getPath(basePath, i);
 			regions[i] = atlas->findRegion(path);
 			if (!regions[i]) return false;

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Attachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Attachment.h>
 
 #include <assert.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/AttachmentLoader.h>
 
 #include <spine/BoundingBoxAttachment.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/AttachmentTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/AttachmentTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Bone.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Bone.h>
 
 #include <spine/BoneData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/BoneData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/BoneData.h>
 
 #include <assert.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/BoundingBoxAttachment.h>
 
 using namespace spine;

+ 0 - 4
spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/ClippingAttachment.h>
 
 #include <spine/SlotData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/ColorTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/ColorTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/ConstraintData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/ConstraintData.h>
 
 using namespace spine;

+ 1 - 5
spine-cpp/spine-cpp/src/spine/CurveTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/CurveTimeline.h>
 
 #include <spine/MathUtil.h>
@@ -115,7 +111,7 @@ void CurveTimeline1::setFrame(size_t frame, float time, float value) {
 }
 
 float CurveTimeline1::getCurveValue(float time) {
-	int i = _frames.size() - 2;
+	int i = (int)_frames.size() - 2;
 	for (int ii = 2; ii <= i; ii += 2) {
 		if (_frames[ii] > time) {
 			i = ii - 2;

+ 0 - 4
spine-cpp/spine-cpp/src/spine/DeformTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/DeformTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/DrawOrderTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/DrawOrderTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Event.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Event.h>
 
 #include <spine/EventData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/EventData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/EventData.h>
 
 #include <assert.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/EventTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/EventTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Extension.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Extension.h>
 #include <spine/SpineString.h>
 

+ 1 - 5
spine-cpp/spine-cpp/src/spine/IkConstraint.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/IkConstraint.h>
 
 #include <spine/Bone.h>
@@ -292,7 +288,7 @@ void IkConstraint::update() {
 }
 
 int IkConstraint::getOrder() {
-	return _data.getOrder();
+	return (int)_data.getOrder();
 }
 
 IkConstraintData &IkConstraint::getData() {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/IkConstraintData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/IkConstraintData.h>
 
 #include <spine/BoneData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/IkConstraintTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/IkConstraintTimeline.h>
 
 #include <spine/Event.h>

+ 1 - 5
spine-cpp/spine-cpp/src/spine/Json.cpp

@@ -21,10 +21,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.
 */
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 /* Json */
 /* JSON parser in CPP, from json.c in the spine-c runtime */
 
@@ -38,8 +34,8 @@ THE SOFTWARE.
 #define _BSD_SOURCE
 #endif
 
-#include <spine/Extension.h>
 #include <spine/Json.h>
+#include <spine/Extension.h>
 #include <spine/SpineString.h>
 
 #include <assert.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/LinkedMesh.h>
 
 #include <spine/MeshAttachment.h>

+ 5 - 5
spine-cpp/spine-cpp/src/spine/Log.cpp

@@ -37,7 +37,7 @@ void spine::spDebug_printSkeletonData(SkeletonData *skeletonData) {
 	int i, n;
 	spDebug_printBoneDatas(skeletonData->getBones());
 
-	for (i = 0, n = skeletonData->getAnimations().size(); i < n; i++) {
+	for (i = 0, n = (int)skeletonData->getAnimations().size(); i < n; i++) {
 		spDebug_printAnimation(skeletonData->getAnimations()[i]);
 	}
 }
@@ -69,7 +69,7 @@ void spine::spDebug_printAnimation(Animation *animation) {
 	int i, n;
 	printf("Animation %s: %zu timelines\n", animation->getName().buffer(), animation->getTimelines().size());
 
-	for (i = 0, n = animation->getTimelines().size(); i < n; i++) {
+	for (i = 0, n = (int)animation->getTimelines().size(); i < n; i++) {
 		Timeline *timeline = animation->getTimelines()[i];
 		spDebug_printTimeline(timeline);
 	}
@@ -77,7 +77,7 @@ void spine::spDebug_printAnimation(Animation *animation) {
 
 void spine::spDebug_printBoneDatas(Vector<BoneData *> &boneDatas) {
 	int i, n;
-	for (i = 0, n = boneDatas.size(); i < n; i++) {
+	for (i = 0, n = (int)boneDatas.size(); i < n; i++) {
 		spDebug_printBoneData(boneDatas[i]);
 	}
 }
@@ -94,7 +94,7 @@ void spine::spDebug_printSkeleton(Skeleton *skeleton) {
 
 void spine::spDebug_printBones(Vector<Bone *> &bones) {
 	int i, n;
-	for (i = 0, n = bones.size(); i < n; i++) {
+	for (i = 0, n = (int)bones.size(); i < n; i++) {
 		spDebug_printBone(bones[i]);
 	}
 }
@@ -116,7 +116,7 @@ void spine::spDebug_printFloats(float *values, int numFloats) {
 void spine::spDebug_printFloats(Vector<float> &values) {
 	int i, n;
 	printf("(%zu) [", values.size());
-	for (i = 0, n = values.size(); i < n; i++) {
+	for (i = 0, n = (int)values.size(); i < n; i++) {
 		printf("%f, ", values[i]);
 	}
 	printf("]");

+ 1 - 5
spine-cpp/spine-cpp/src/spine/MathUtil.cpp

@@ -27,12 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <math.h>
 #include <spine/MathUtil.h>
+#include <math.h>
 #include <stdlib.h>
 
 // Required for division by 0 in _isNaN on MSVC

+ 2 - 6
spine-cpp/spine-cpp/src/spine/MeshAttachment.cpp

@@ -27,12 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <spine/HasRendererObject.h>
 #include <spine/MeshAttachment.h>
+#include <spine/HasRendererObject.h>
 
 using namespace spine;
 
@@ -57,7 +53,7 @@ void MeshAttachment::updateRegion() {
 		_uvs.setSize(_regionUVs.size(), 0);
 	}
 
-	int i = 0, n = _regionUVs.size();
+	int i = 0, n = (int)_regionUVs.size();
 	float u = _region->u, v = _region->v;
 	float width = 0, height = 0;
 

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PathAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PathAttachment.h>
 
 using namespace spine;

+ 4 - 8
spine-cpp/spine-cpp/src/spine/PathConstraint.cpp

@@ -26,11 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
-
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
+ 
 #include <spine/PathConstraint.h>
 
 #include <spine/Bone.h>
@@ -152,7 +148,7 @@ void PathConstraint::update() {
 		}
 	}
 
-	Vector<float> &positions = computeWorldPositions(*attachment, spacesCount, tangents);
+	Vector<float> &positions = computeWorldPositions(*attachment, (int)spacesCount, tangents);
 	float boneX = positions[0];
 	float boneY = positions[1];
 	float offsetRotation = data.getOffsetRotation();
@@ -225,7 +221,7 @@ void PathConstraint::update() {
 }
 
 int PathConstraint::getOrder() {
-	return _data.getOrder();
+	return (int)_data.getOrder();
 }
 
 float PathConstraint::getPosition() {
@@ -292,7 +288,7 @@ PathConstraint::computeWorldPositions(PathAttachment &path, int spacesCount, boo
 	Vector<float> &out = _positions;
 	Vector<float> &world = _world;
 	bool closed = path.isClosed();
-	int verticesLength = path.getWorldVerticesLength();
+	int verticesLength = (int)path.getWorldVerticesLength();
 	int curveCount = verticesLength / 6;
 	int prevCurve = NONE;
 

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PathConstraintData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PathConstraintData.h>
 
 #include <spine/BoneData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PathConstraintMixTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PathConstraintMixTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PathConstraintPositionTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PathConstraintPositionTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PathConstraintSpacingTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PathConstraintSpacingTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/PointAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/PointAttachment.h>
 
 #include <spine/Bone.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/RTTI.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/RTTI.h>
 #include <spine/SpineString.h>
 

+ 0 - 4
spine-cpp/spine-cpp/src/spine/RegionAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/RegionAttachment.h>
 
 #include <spine/Bone.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/RotateTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/RotateTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/ScaleTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/ScaleTimeline.h>
 
 #include <spine/Event.h>

+ 3 - 3
spine-cpp/spine-cpp/src/spine/Sequence.cpp

@@ -47,7 +47,7 @@ Sequence::~Sequence() {
 }
 
 Sequence *Sequence::copy() {
-	Sequence *copy = new (__FILE__, __LINE__) Sequence(_regions.size());
+	Sequence *copy = new (__FILE__, __LINE__) Sequence((int)_regions.size());
 	for (size_t i = 0; i < _regions.size(); i++) {
 		copy->_regions[i] = _regions[i];
 	}
@@ -60,7 +60,7 @@ Sequence *Sequence::copy() {
 void Sequence::apply(Slot *slot, Attachment *attachment) {
 	int index = slot->getSequenceIndex();
 	if (index == -1) index = _setupIndex;
-	if (index >= (int) _regions.size()) index = _regions.size() - 1;
+	if (index >= (int) _regions.size()) index = (int)_regions.size() - 1;
 	TextureRegion *region = _regions[index];
 
 	if (attachment->getRTTI().isExactly(RegionAttachment::rtti)) {
@@ -86,7 +86,7 @@ String Sequence::getPath(const String &basePath, int index) {
 	String result(basePath);
 	String frame;
 	frame.append(_start + index);
-	for (int i = _digits - frame.length(); i > 0; i--)
+	for (int i = _digits - (int)frame.length(); i > 0; i--)
 		result.append("0");
 	result.append(frame);
 	return result;

+ 2 - 8
spine-cpp/spine-cpp/src/spine/SequenceTimeline.cpp

@@ -27,21 +27,15 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <spine/Bone.h>
 #include <spine/SequenceTimeline.h>
+#include <spine/Bone.h>
 #include <spine/RegionAttachment.h>
 #include <spine/MeshAttachment.h>
 #include <spine/Event.h>
 #include <spine/Skeleton.h>
 #include <spine/Attachment.h>
-#include <spine/PathConstraint.h>
 #include <spine/PathConstraintData.h>
 #include <spine/Slot.h>
-#include <spine/SlotData.h>
 #include <spine/Animation.h>
 
 using namespace spine;
@@ -95,7 +89,7 @@ void SequenceTimeline::apply(Skeleton &skeleton, float lastTime, float time, Vec
 	Sequence *sequence = NULL;
 	if (_attachment->getRTTI().instanceOf(RegionAttachment::rtti)) sequence = ((RegionAttachment *) _attachment)->getSequence();
 	if (_attachment->getRTTI().instanceOf(MeshAttachment::rtti)) sequence = ((MeshAttachment *) _attachment)->getSequence();
-	int index = modeAndIndex >> 4, count = sequence->getRegions().size();
+	int index = modeAndIndex >> 4, count = (int)sequence->getRegions().size();
 	int mode = modeAndIndex & 0xf;
 	if (mode != SequenceMode::hold) {
 		index += (int) (((time - before) / delay + 0.00001));

+ 0 - 4
spine-cpp/spine-cpp/src/spine/ShearTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/ShearTimeline.h>
 
 #include <spine/Event.h>

+ 1 - 5
spine-cpp/spine-cpp/src/spine/Skeleton.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Skeleton.h>
 
 #include <spine/Attachment.h>
@@ -372,7 +368,7 @@ void Skeleton::setAttachment(const String &slotName, const String &attachmentNam
 		if (slot->_data.getName() == slotName) {
 			Attachment *attachment = NULL;
 			if (attachmentName.length() > 0) {
-				attachment = getAttachment(i, attachmentName);
+				attachment = getAttachment((int)i, attachmentName);
 
 				assert(attachment != NULL);
 			}

+ 9 - 13
spine-cpp/spine-cpp/src/spine/SkeletonBinary.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SkeletonBinary.h>
 
 #include <spine/Animation.h>
@@ -291,7 +287,7 @@ SkeletonData *SkeletonBinary::readSkeletonData(const unsigned char *binary, cons
 	}
 
 	/* Linked meshes. */
-	for (int i = 0, n = _linkedMeshes.size(); i < n; ++i) {
+	for (int i = 0, n = (int)_linkedMeshes.size(); i < n; ++i) {
 		LinkedMesh *linkedMesh = _linkedMeshes[i];
 		Skin *skin = linkedMesh->_skin.length() == 0 ? skeletonData->getDefaultSkin() : skeletonData->findSkin(linkedMesh->_skin);
 		if (skin == NULL) {
@@ -757,7 +753,7 @@ void SkeletonBinary::setBezier(DataInput *input, CurveTimeline *timeline, int be
 Timeline *SkeletonBinary::readTimeline(DataInput *input, CurveTimeline1 *timeline, float scale) {
 	float time = readFloat(input);
 	float value = readFloat(input) * scale;
-	for (int frame = 0, bezier = 0, frameLast = timeline->getFrameCount() - 1;; frame++) {
+	for (int frame = 0, bezier = 0, frameLast = (int)timeline->getFrameCount() - 1;; frame++) {
 		timeline->setFrame(frame, time, value);
 		if (frame == frameLast) break;
 		float time2 = readFloat(input);
@@ -779,7 +775,7 @@ Timeline *SkeletonBinary::readTimeline2(DataInput *input, CurveTimeline2 *timeli
 	float time = readFloat(input);
 	float value1 = readFloat(input) * scale;
 	float value2 = readFloat(input) * scale;
-	for (int frame = 0, bezier = 0, frameLast = timeline->getFrameCount() - 1;; frame++) {
+	for (int frame = 0, bezier = 0, frameLast = (int)timeline->getFrameCount() - 1;; frame++) {
 		timeline->setFrame(frame, time, value1, value2);
 		if (frame == frameLast) break;
 		float time2 = readFloat(input);
@@ -1202,7 +1198,7 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
 					float mixRotate = readFloat(input);
 					float mixX = readFloat(input);
 					float mixY = readFloat(input);
-					for (int frame = 0, bezier = 0, frameLast = timeline->getFrameCount() - 1;; frame++) {
+					for (int frame = 0, bezier = 0, frameLast = (int)timeline->getFrameCount() - 1;; frame++) {
 						timeline->setFrame(frame, time, mixRotate, mixX, mixY);
 						if (frame == frameLast) break;
 						float time2 = readFloat(input);
@@ -1250,7 +1246,7 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
 					case ATTACHMENT_DEFORM: {
 						bool weighted = attachment->_bones.size() > 0;
 						Vector<float> &vertices = attachment->_vertices;
-						int deformLength = weighted ? vertices.size() / 3 * 2 : vertices.size();
+						int deformLength = weighted ? (int)vertices.size() / 3 * 2 : (int)vertices.size();
 
 						int bezierCount = readVarint(input, true);
 						DeformTimeline *timeline = new (__FILE__, __LINE__) DeformTimeline(frameCount, bezierCount, slotIndex,
@@ -1340,15 +1336,15 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
 				size_t slotIndex = (size_t) readVarint(input, true);
 				// Collect unchanged items.
 				while (originalIndex != slotIndex)
-					unchanged[unchangedIndex++] = originalIndex++;
+					unchanged[unchangedIndex++] = (int)originalIndex++;
 				// Set changed items.
 				size_t index = originalIndex;
-				drawOrder[index + (size_t) readVarint(input, true)] = originalIndex++;
+				drawOrder[index + (size_t) readVarint(input, true)] = (int)originalIndex++;
 			}
 
 			// Collect remaining unchanged items.
 			while (originalIndex < slotCount) {
-				unchanged[unchangedIndex++] = originalIndex++;
+				unchanged[unchangedIndex++] = (int)originalIndex++;
 			}
 
 			// Fill in unchanged items.
@@ -1386,7 +1382,7 @@ Animation *SkeletonBinary::readAnimation(const String &name, DataInput *input, S
 	}
 
 	float duration = 0;
-	for (int i = 0, n = timelines.size(); i < n; i++) {
+	for (int i = 0, n = (int)timelines.size(); i < n; i++) {
 		duration = MathUtil::max(duration, (timelines[i])->getDuration());
 	}
 	return new (__FILE__, __LINE__) Animation(String(name), timelines, duration);

+ 1 - 5
spine-cpp/spine-cpp/src/spine/SkeletonBounds.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SkeletonBounds.h>
 
 #include <spine/Bone.h>
@@ -78,7 +74,7 @@ void SkeletonBounds::update(Skeleton &skeleton, bool updateAabb) {
 		Polygon &polygon = *polygonP;
 
 		size_t count = boundingBox->getWorldVerticesLength();
-		polygon._count = count;
+		polygon._count = (int)count;
 		if (polygon._vertices.size() < count) {
 			polygon._vertices.setSize(count, 0);
 		}

+ 5 - 9
spine-cpp/spine-cpp/src/spine/SkeletonClipping.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SkeletonClipping.h>
 
 #include <spine/ClippingAttachment.h>
@@ -52,7 +48,7 @@ size_t SkeletonClipping::clipStart(Slot &slot, ClippingAttachment *clip) {
 
 	_clipAttachment = clip;
 
-	int n = clip->getWorldVerticesLength();
+	int n = (int)clip->getWorldVerticesLength();
 	_clippingPolygon.setSize(n, 0);
 	clip->computeWorldVertices(slot, 0, n, _clippingPolygon, 0, 2);
 	makeClockwise(_clippingPolygon);
@@ -107,15 +103,15 @@ void SkeletonClipping::clipTriangles(float *vertices, unsigned short *triangles,
 	size_t i = 0;
 continue_outer:
 	for (; i < trianglesLength; i += 3) {
-		int vertexOffset = triangles[i] * stride;
+		int vertexOffset = triangles[i] * (int)stride;
 		float x1 = vertices[vertexOffset], y1 = vertices[vertexOffset + 1];
 		float u1 = uvs[vertexOffset], v1 = uvs[vertexOffset + 1];
 
-		vertexOffset = triangles[i + 1] * stride;
+		vertexOffset = triangles[i + 1] * (int)stride;
 		float x2 = vertices[vertexOffset], y2 = vertices[vertexOffset + 1];
 		float u2 = uvs[vertexOffset], v2 = uvs[vertexOffset + 1];
 
-		vertexOffset = triangles[i + 2] * stride;
+		vertexOffset = triangles[i + 2] * (int)stride;
 		float x3 = vertices[vertexOffset], y3 = vertices[vertexOffset + 1];
 		float u3 = uvs[vertexOffset], v3 = uvs[vertexOffset + 1];
 
@@ -318,7 +314,7 @@ void SkeletonClipping::makeClockwise(Vector<float> &polygon) {
 
 	for (size_t i = 0, lastX = verticeslength - 2, n = verticeslength >> 1; i < n; i += 2) {
 		float x = polygon[i], y = polygon[i + 1];
-		int other = lastX - i;
+		int other = (int)(lastX - i);
 		polygon[i] = polygon[other];
 		polygon[i + 1] = polygon[other + 1];
 		polygon[other] = x;

+ 0 - 4
spine-cpp/spine-cpp/src/spine/SkeletonData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SkeletonData.h>
 
 #include <spine/Animation.h>

+ 6 - 10
spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SkeletonJson.h>
 
 #include <spine/Atlas.h>
@@ -715,7 +711,7 @@ SkeletonData *SkeletonJson::readSkeletonData(const char *json) {
 	}
 
 	/* Linked meshes. */
-	int n = _linkedMeshes.size();
+	int n = (int)_linkedMeshes.size();
 	for (i = 0; i < n; ++i) {
 		LinkedMesh *linkedMesh = _linkedMeshes[i];
 		Skin *skin = linkedMesh->_skin.length() == 0 ? skeletonData->getDefaultSkin() : skeletonData->findSkin(linkedMesh->_skin);
@@ -1280,7 +1276,7 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {
 						VertexAttachment *vertexAttachment = static_cast<VertexAttachment *>(attachment);
 						bool weighted = vertexAttachment->_bones.size() != 0;
 						Vector<float> &verts = vertexAttachment->_vertices;
-						int deformLength = weighted ? verts.size() / 3 * 2 : verts.size();
+						int deformLength = weighted ? (int)verts.size() / 3 * 2 : (int)verts.size();
 
 						DeformTimeline *timeline = new (__FILE__, __LINE__) DeformTimeline(frames,
 																						   frames, slotIndex, vertexAttachment);
@@ -1380,14 +1376,14 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {
 
 					/* Collect unchanged items. */
 					while (originalIndex != (size_t) slotIndex)
-						unchanged[unchangedIndex++] = originalIndex++;
+						unchanged[unchangedIndex++] = (int)originalIndex++;
 					/* Set changed items. */
-					drawOrder2[originalIndex + Json::getInt(offsetMap, "offset", 0)] = originalIndex;
+					drawOrder2[originalIndex + Json::getInt(offsetMap, "offset", 0)] = (int)originalIndex;
 					originalIndex++;
 				}
 				/* Collect remaining unchanged items. */
-				while (originalIndex < skeletonData->_slots.size())
-					unchanged[unchangedIndex++] = originalIndex++;
+				while (originalIndex < (int)skeletonData->_slots.size())
+					unchanged[unchangedIndex++] = (int)originalIndex++;
 				/* Fill in unchanged items. */
 				for (ii = (int) skeletonData->_slots.size() - 1; ii >= 0; ii--)
 					if (drawOrder2[ii] == -1) drawOrder2[ii] = unchanged[--unchangedIndex];

+ 2 - 6
spine-cpp/spine-cpp/src/spine/Skin.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Skin.h>
 
 #include <spine/Attachment.h>
@@ -84,7 +80,7 @@ void Skin::AttachmentMap::remove(size_t slotIndex, const String &attachmentName)
 
 int Skin::AttachmentMap::findInBucket(Vector<Entry> &bucket, const String &attachmentName) {
 	for (size_t i = 0; i < bucket.size(); i++)
-		if (bucket[i]._name == attachmentName) return i;
+		if (bucket[i]._name == attachmentName) return (int)i;
 	return -1;
 }
 
@@ -148,7 +144,7 @@ void Skin::attachAll(Skeleton &skeleton, Skin &oldSkin) {
 	Skin::AttachmentMap::Entries entries = oldSkin.getAttachments();
 	while (entries.hasNext()) {
 		Skin::AttachmentMap::Entry &entry = entries.next();
-		int slotIndex = entry._slotIndex;
+		int slotIndex = (int)entry._slotIndex;
 		Slot *slot = slots[slotIndex];
 
 		if (slot->getAttachment() == entry._attachment) {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Slot.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Slot.h>
 
 #include <spine/Attachment.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/SlotData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/SlotData.h>
 
 #include <assert.h>

+ 1 - 5
spine-cpp/spine-cpp/src/spine/SpineObject.cpp

@@ -27,12 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
-#include <spine/Extension.h>
 #include <spine/SpineObject.h>
+#include <spine/Extension.h>
 
 using namespace spine;
 

+ 0 - 4
spine-cpp/spine-cpp/src/spine/TextureLoader.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/TextureLoader.h>
 
 namespace spine {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Timeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Timeline.h>
 
 #include <spine/Event.h>

+ 1 - 5
spine-cpp/spine-cpp/src/spine/TransformConstraint.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/TransformConstraint.h>
 
 #include <spine/Bone.h>
@@ -82,7 +78,7 @@ void TransformConstraint::update() {
 }
 
 int TransformConstraint::getOrder() {
-	return _data.getOrder();
+	return (int)_data.getOrder();
 }
 
 TransformConstraintData &TransformConstraint::getData() {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/TransformConstraintData.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/TransformConstraintData.h>
 
 #include <spine/BoneData.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/TransformConstraintTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/TransformConstraintTimeline.h>
 
 #include <spine/Event.h>

+ 0 - 4
spine-cpp/spine-cpp/src/spine/TranslateTimeline.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/TranslateTimeline.h>
 
 #include <spine/Event.h>

+ 7 - 11
spine-cpp/spine-cpp/src/spine/Triangulator.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Triangulator.h>
 
 #include <spine/MathUtil.h>
@@ -49,15 +45,15 @@ Vector<int> &Triangulator::triangulate(Vector<float> &vertices) {
 	indices.clear();
 	indices.ensureCapacity(vertexCount);
 	indices.setSize(vertexCount, 0);
-	for (size_t i = 0; i < vertexCount; ++i) {
+	for (int i = 0; i < vertexCount; ++i) {
 		indices[i] = i;
 	}
 
 	Vector<bool> &isConcaveArray = _isConcaveArray;
 	isConcaveArray.ensureCapacity(vertexCount);
 	isConcaveArray.setSize(vertexCount, 0);
-	for (size_t i = 0, n = vertexCount; i < n; ++i) {
-		isConcaveArray[i] = isConcave(i, vertexCount, vertices, indices);
+	for (int i = 0, n = (int)vertexCount; i < n; ++i) {
+		isConcaveArray[i] = isConcave(i, (int)vertexCount, vertices, indices);
 	}
 
 	Vector<int> &triangles = _triangles;
@@ -113,10 +109,10 @@ Vector<int> &Triangulator::triangulate(Vector<float> &vertices) {
 		isConcaveArray.removeAt(i);
 		vertexCount--;
 
-		int previousIndex = (vertexCount + i - 1) % vertexCount;
-		int nextIndex = i == vertexCount ? 0 : i;
-		isConcaveArray[previousIndex] = isConcave(previousIndex, vertexCount, vertices, indices);
-		isConcaveArray[nextIndex] = isConcave(nextIndex, vertexCount, vertices, indices);
+		int previousIndex = (int)((vertexCount + i - 1) % vertexCount);
+		int nextIndex = (int)(i == vertexCount ? 0 : i);
+		isConcaveArray[previousIndex] = isConcave(previousIndex, (int)vertexCount, vertices, indices);
+		isConcaveArray[nextIndex] = isConcave(nextIndex, (int)vertexCount, vertices, indices);
 	}
 
 	if (vertexCount == 3) {

+ 0 - 4
spine-cpp/spine-cpp/src/spine/Updatable.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/Updatable.h>
 
 using namespace spine;

+ 3 - 7
spine-cpp/spine-cpp/src/spine/VertexAttachment.cpp

@@ -27,10 +27,6 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
 #include <spine/VertexAttachment.h>
 
 #include <spine/Slot.h>
@@ -87,7 +83,7 @@ void VertexAttachment::computeWorldVertices(Slot &slot, size_t start, size_t cou
 
 	int v = 0, skip = 0;
 	for (size_t i = 0; i < start; i += 2) {
-		int n = bones[v];
+		int n = (int)bones[v];
 		v += n + 1;
 		skip += n;
 	}
@@ -96,7 +92,7 @@ void VertexAttachment::computeWorldVertices(Slot &slot, size_t start, size_t cou
 	if (deformArray->size() == 0) {
 		for (size_t w = offset, b = skip * 3; w < count; w += stride) {
 			float wx = 0, wy = 0;
-			int n = bones[v++];
+			int n = (int)bones[v++];
 			n += v;
 			for (; v < n; v++, b += 3) {
 				Bone *boneP = skeletonBones[bones[v]];
@@ -113,7 +109,7 @@ void VertexAttachment::computeWorldVertices(Slot &slot, size_t start, size_t cou
 	} else {
 		for (size_t w = offset, b = skip * 3, f = skip << 1; w < count; w += stride) {
 			float wx = 0, wy = 0;
-			int n = bones[v++];
+			int n = (int)bones[v++];
 			n += v;
 			for (; v < n; v++, b += 3, f += 2) {
 				Bone *boneP = skeletonBones[bones[v]];

+ 1 - 5
spine-cpp/spine-cpp/src/spine/VertexEffect.cpp

@@ -27,13 +27,9 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#ifdef SPINE_UE4
-#include "SpinePluginPrivatePCH.h"
-#endif
-
+#include <spine/VertexEffect.h>
 #include <spine/MathUtil.h>
 #include <spine/Skeleton.h>
-#include <spine/VertexEffect.h>
 
 using namespace spine;
 

+ 1 - 0
spine-ue4/Config/DefaultEngine.ini

@@ -69,4 +69,5 @@ r.DefaultFeature.AmbientOcclusionStaticFraction=False
 r.DefaultFeature.AutoExposure=False
 r.UsePreExposure=False
 r.DefaultFeature.MotionBlur=False
+r.TextureStreaming=False
 

+ 1 - 7
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineAtlasImportFactory.cpp

@@ -27,18 +27,12 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpineEditorPluginPrivatePCH.h"
-
+#include "SpineAtlasImportFactory.h"
 #include "AssetRegistryModule.h"
 #include "AssetToolsModule.h"
 #include "Developer/AssetTools/Public/IAssetTools.h"
-#include "Developer/DesktopPlatform/Public/DesktopPlatformModule.h"
-#include "Developer/DesktopPlatform/Public/IDesktopPlatform.h"
 #include "PackageTools.h"
 #include "SpineAtlasAsset.h"
-#include <stdlib.h>
-#include <string.h>
-#include <string>
 
 #define LOCTEXT_NAMESPACE "Spine"
 

+ 1 - 3
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineEditorPlugin.cpp

@@ -27,9 +27,7 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpineEditorPluginPrivatePCH.h"
-#include "spine/spine.h"
-
+#include "SpineEditorPlugin.h"
 
 class FSpineEditorPlugin : public ISpineEditorPlugin {
 	virtual void StartupModule() override;

+ 0 - 33
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineEditorPluginPrivatePCH.h

@@ -1,33 +0,0 @@
-/******************************************************************************
- * Spine Runtimes License Agreement
- * Last updated September 24, 2021. Replaces all prior versions.
- *
- * Copyright (c) 2013-2021, 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.
- *
- * THE SPINE RUNTIMES ARE 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
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *****************************************************************************/
-
-#include "SpineAtlasImportFactory.h"
-#include "SpineEditorPlugin.h"
-#include "SpinePlugin.h"
-#include "SpineSkeletonImportFactory.h"

+ 1 - 8
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/Private/SpineSkeletonImportFactory.cpp

@@ -27,18 +27,11 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpineEditorPluginPrivatePCH.h"
-
-#include "AssetRegistryModule.h"
+#include "SpineSkeletonImportFactory.h"
 #include "AssetToolsModule.h"
 #include "Developer/AssetTools/Public/IAssetTools.h"
-#include "Developer/DesktopPlatform/Public/DesktopPlatformModule.h"
-#include "Developer/DesktopPlatform/Public/IDesktopPlatform.h"
-#include "PackageTools.h"
 #include "SpineSkeletonDataAsset.h"
-#include <stdlib.h>
 #include <string.h>
-#include <string>
 
 #define LOCTEXT_NAMESPACE "Spine"
 

+ 5 - 10
spine-ue4/Plugins/SpinePlugin/Source/SpineEditorPlugin/SpineEditorPlugin.Build.cs

@@ -1,17 +1,12 @@
-using System;
 using System.IO;
 
 namespace UnrealBuildTool.Rules
 {
 	public class SpineEditorPlugin : ModuleRules
 	{
-		public SpineEditorPlugin(ReadOnlyTargetRules Target) : base(Target)
+		public SpineEditorPlugin(ReadOnlyTargetRules target) : base(target)
 		{
-            PrivatePCHHeaderFile = "Private/SpineEditorPluginPrivatePCH.h";
-            PCHUsage = PCHUsageMode.UseSharedPCHs;
-#if UE_4_24_OR_LATER
-            DefaultBuildSettings = BuildSettingsVersion.V1;
-#endif
+			PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
 
             PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
 			PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));
@@ -19,7 +14,7 @@ namespace UnrealBuildTool.Rules
 			PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));
 			PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "../SpinePlugin/Public/spine-cpp/include"));
 
-            PublicDependencyModuleNames.AddRange(new string[] {
+            PublicDependencyModuleNames.AddRange(new [] {
                 "Core",
                 "CoreUObject",
                 "Engine",
@@ -27,12 +22,12 @@ namespace UnrealBuildTool.Rules
                 "SpinePlugin"
             });
 
-            PublicIncludePathModuleNames.AddRange(new string[] {
+            PublicIncludePathModuleNames.AddRange(new [] {
                "AssetTools",
                "AssetRegistry"
             });
 
-            DynamicallyLoadedModuleNames.AddRange(new string[] {
+            DynamicallyLoadedModuleNames.AddRange(new [] {
                "AssetTools",
                "AssetRegistry"
             });

+ 1 - 5
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SSpineWidget.cpp

@@ -27,18 +27,14 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
-
+#include "SSpineWidget.h"
 #include "Framework/Application/SlateApplication.h"
 #include "Materials/MaterialInstanceDynamic.h"
 #include "Materials/MaterialInterface.h"
-#include "Modules/ModuleManager.h"
 #include "Rendering/DrawElements.h"
 #include "Runtime/SlateRHIRenderer/Public/Interfaces/ISlateRHIRendererModule.h"
-#include "SSpineWidget.h"
 #include "Slate/SMeshWidget.h"
 #include "Slate/SlateVectorArtData.h"
-#include "Slate/SlateVectorArtInstanceData.h"
 #include "SlateMaterialBrush.h"
 #include "SpineWidget.h"
 #include <spine/spine.h>

+ 3 - 2
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineAtlasAsset.cpp

@@ -27,12 +27,13 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpineAtlasAsset.h"
 #include "spine/spine.h"
-#include <stdlib.h>
 #include <string.h>
 #include <string>
 
+#include "EditorFramework/AssetImportData.h"
+
 #define LOCTEXT_NAMESPACE "Spine"
 
 using namespace spine;

+ 3 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneDriverComponent.cpp

@@ -27,7 +27,9 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpineBoneDriverComponent.h"
+#include "SpineSkeletonComponent.h"
+#include "GameFramework/Actor.h"
 
 USpineBoneDriverComponent::USpineBoneDriverComponent() {
 	PrimaryComponentTick.bCanEverTick = true;

+ 3 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineBoneFollowerComponent.cpp

@@ -27,7 +27,9 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpineBoneFollowerComponent.h"
+#include "SpineSkeletonComponent.h"
+#include "GameFramework/Actor.h"
 
 USpineBoneFollowerComponent::USpineBoneFollowerComponent() {
 	PrimaryComponentTick.bCanEverTick = true;

+ 1 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePlugin.cpp

@@ -27,7 +27,7 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpinePlugin.h"
 #include "spine/Extension.h"
 
 DEFINE_LOG_CATEGORY(SpineLog);

+ 0 - 38
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpinePluginPrivatePCH.h

@@ -1,38 +0,0 @@
-/******************************************************************************
- * Spine Runtimes License Agreement
- * Last updated September 24, 2021. Replaces all prior versions.
- *
- * Copyright (c) 2013-2021, 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.
- *
- * THE SPINE RUNTIMES ARE 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
- * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *****************************************************************************/
-
-#include "SpineAtlasAsset.h"
-#include "SpineBoneDriverComponent.h"
-#include "SpineBoneFollowerComponent.h"
-#include "SpinePlugin.h"
-#include "SpineSkeletonAnimationComponent.h"
-#include "SpineSkeletonComponent.h"
-#include "SpineSkeletonDataAsset.h"
-#include "SpineSkeletonRendererComponent.h"
-#include "SpineWidget.h"

+ 2 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonAnimationComponent.cpp

@@ -27,7 +27,8 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpineSkeletonAnimationComponent.h"
+#include "SpineAtlasAsset.h"
 
 #define LOCTEXT_NAMESPACE "Spine"
 

+ 3 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp

@@ -27,7 +27,9 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "SpinePluginPrivatePCH.h"
+#include "SpineSkeletonComponent.h"
+#include "SpineSkeletonRendererComponent.h"
+#include "SpineAtlasAsset.h"
 
 #include "spine/spine.h"
 

+ 3 - 3
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonDataAsset.cpp

@@ -27,12 +27,12 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
+#include "SpineSkeletonDataAsset.h"
+#include "SpinePlugin.h"
 #include "Runtime/Core/Public/Misc/MessageDialog.h"
-#include "SpinePluginPrivatePCH.h"
+#include "EditorFramework/AssetImportData.h"
 #include "spine/spine.h"
 #include "spine/Version.h"
-#include <stdlib.h>
-#include <string.h>
 #include <string>
 
 #define LOCTEXT_NAMESPACE "Spine"

+ 5 - 3
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp

@@ -27,10 +27,12 @@
  * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
 
-#include "Engine.h"
-#include "SpinePluginPrivatePCH.h"
+#include "SpineSkeletonRendererComponent.h"
+
+#include "SpineAtlasAsset.h"
+#include "Materials/MaterialInstanceDynamic.h"
 #include "spine/spine.h"
-#include <stdlib.h>
+#include "UObject/ConstructorHelpers.h"
 
 #define LOCTEXT_NAMESPACE "Spine"
 

+ 6 - 3
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineWidget.cpp

@@ -28,9 +28,8 @@
  *****************************************************************************/
 
 #include "SpineWidget.h"
-#include "Engine.h"
 #include "SSpineWidget.h"
-#include "SpinePluginPrivatePCH.h"
+#include "SpineSkeletonAnimationComponent.h"
 #include "spine/spine.h"
 
 #define LOCTEXT_NAMESPACE "Spine"
@@ -249,7 +248,7 @@ void USpineWidget::GetSkins(TArray<FString> &Skins) {
 bool USpineWidget::HasSkin(const FString skinName) {
 	CheckState();
 	if (skeleton) {
-		return skeleton->getData()->findAnimation(TCHAR_TO_UTF8(*skinName)) != nullptr;
+		return skeleton->getData()->findSkin(TCHAR_TO_UTF8(*skinName)) != nullptr;
 	}
 	return false;
 }
@@ -257,6 +256,10 @@ bool USpineWidget::HasSkin(const FString skinName) {
 bool USpineWidget::SetAttachment(const FString slotName, const FString attachmentName) {
 	CheckState();
 	if (skeleton) {
+		if (attachmentName.IsEmpty()) {
+			skeleton->setAttachment(TCHAR_TO_UTF8(*slotName), NULL);
+			return true;
+		}
 		if (!skeleton->getAttachment(TCHAR_TO_UTF8(*slotName), TCHAR_TO_UTF8(*attachmentName))) return false;
 		skeleton->setAttachment(TCHAR_TO_UTF8(*slotName), TCHAR_TO_UTF8(*attachmentName));
 		return true;

+ 1 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineAtlasAsset.h

@@ -30,7 +30,7 @@
 #pragma once
 
 // clang-format off
-#include "Engine.h"
+#include "Engine/Texture2D.h"
 #include "spine/spine.h"
 #include "SpineAtlasAsset.generated.h"
 // clang-format on

+ 1 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineBoneFollowerComponent.h

@@ -30,6 +30,7 @@
 #pragma once
 
 #include "Components/ActorComponent.h"
+#include "Components/SceneComponent.h"
 #include "SpineBoneFollowerComponent.generated.h"
 
 

+ 0 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonDataAsset.h

@@ -30,7 +30,6 @@
 #pragma once
 
 // clang-format off
-#include "Engine.h"
 #include "spine/spine.h"
 #include "SpineSkeletonDataAsset.generated.h"
 // clang-format on

+ 2 - 1
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineWidget.h

@@ -31,13 +31,14 @@
 
 // clang-format off
 #include "Runtime/UMG/Public/UMG.h"
-#include "Runtime/UMG/Public/UMGStyle.h"
 #include "SpineSkeletonDataAsset.h"
+#include "SpineSkeletonAnimationComponent.h"
 #include "spine/spine.h"
 #include "SpineWidget.generated.h"
 // clang-format on
 
 class SSpineWidget;
+class USpineWidget;
 
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpineWidgetBeforeUpdateWorldTransformDelegate, USpineWidget *, skeleton);
 DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FSpineWidgetAfterUpdateWorldTransformDelegate, USpineWidget *, skeleton);

+ 3 - 8
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.Build.cs

@@ -5,13 +5,9 @@ namespace UnrealBuildTool.Rules
 {
 	public class SpinePlugin : ModuleRules
 	{
-		public SpinePlugin(ReadOnlyTargetRules Target) : base(Target)
+		public SpinePlugin(ReadOnlyTargetRules target) : base(target)
 		{
-            PrivatePCHHeaderFile = "Private/SpinePluginPrivatePCH.h";
-			PCHUsage = PCHUsageMode.UseSharedPCHs;
-#if UE_4_24_OR_LATER
-            DefaultBuildSettings = BuildSettingsVersion.V1;
-#endif
+			PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
 
 			PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public"));
 			PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));
@@ -19,8 +15,7 @@ namespace UnrealBuildTool.Rules
 			PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Private"));
 			PrivateIncludePaths.Add(Path.Combine(ModuleDirectory, "Public/spine-cpp/include"));
 
-            PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });
-			PublicDefinitions.Add("SPINE_UE4");
+            PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "ProceduralMeshComponent", "UMG", "Slate", "SlateCore" });			
 		}
 	}
 }

+ 1 - 0
spine-ue4/Source/SpineUE4.Target.cs

@@ -7,6 +7,7 @@ public class SpineUE4Target : TargetRules
 {
 	public SpineUE4Target(TargetInfo Target) : base(Target)
 	{
+		DefaultBuildSettings = BuildSettingsVersion.V2;
 		Type = TargetType.Game;
 		ExtraModuleNames.AddRange(new string[] { "SpineUE4" });
 	}

+ 2 - 4
spine-ue4/Source/SpineUE4Editor.Target.cs

@@ -1,12 +1,10 @@
-// Fill out your copyright notice in the Description page of Project Settings.
-
 using UnrealBuildTool;
-using System.Collections.Generic;
 
 public class SpineUE4EditorTarget : TargetRules
 {
-	public SpineUE4EditorTarget(TargetInfo Target) : base(Target)
+	public SpineUE4EditorTarget(TargetInfo target) : base(target)
 	{
+		DefaultBuildSettings = BuildSettingsVersion.V2;
 		Type = TargetType.Editor;
 		ExtraModuleNames.AddRange(new string[] { "SpineUE4" });
 	}