├── .gitignore
├── Android
├── .gitignore
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── github
│ │ │ └── keith2018
│ │ │ └── animation
│ │ │ └── spine
│ │ │ └── ExampleInstrumentedTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ │ └── boy
│ │ │ │ ├── spineboy-ess.json
│ │ │ │ ├── spineboy.atlas
│ │ │ │ └── spineboy.png
│ │ ├── cpp
│ │ │ ├── CMakeLists.txt
│ │ │ └── native-lib.cpp
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── github
│ │ │ │ └── keith2018
│ │ │ │ └── animation
│ │ │ │ └── spine
│ │ │ │ ├── GLProducerThread.java
│ │ │ │ ├── GLRendererImpl.java
│ │ │ │ └── MainActivity.java
│ │ └── res
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ └── activity_main.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── values-night
│ │ │ └── themes.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── github
│ │ └── keith2018
│ │ └── animation
│ │ └── spine
│ │ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
├── LICENSE
├── Mac
├── CMakeLists.txt
├── SpineGLContext.cpp
├── SpineGLContext.h
├── glfw
│ ├── include
│ │ └── GLFW
│ │ │ ├── glfw3.h
│ │ │ └── glfw3native.h
│ └── lib-x86_64
│ │ ├── libglfw.3.dylib
│ │ └── libglfw3.a
└── main.cpp
├── README.md
├── iOS
├── Resources
│ └── Spine.bundle
│ │ └── boy
│ │ ├── spineboy-ess.json
│ │ ├── spineboy.atlas
│ │ └── spineboy.png
├── Spine iOS.xcodeproj
│ └── project.pbxproj
└── Spine iOS
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── SceneDelegate.h
│ ├── SceneDelegate.m
│ ├── ViewController.h
│ ├── ViewController.mm
│ └── main.m
├── render
├── CMakeLists.txt
├── GLBatchRender.cpp
├── GLBatchRender.h
├── SkeletonDrawable.cpp
├── SkeletonDrawable.h
├── SpineController.cpp
├── SpineController.h
└── utils
│ ├── Logger.h
│ └── stb_image.h
├── screenshot
├── Android.png
├── Mac.png
└── iOS.jpeg
├── spine-cpp
├── CMakeLists.txt
├── LICENSE
├── README.md
├── spine-cpp-unit-tests
│ ├── CMakeLists.txt
│ ├── README.md
│ └── src
│ │ └── main.cpp
└── spine-cpp
│ ├── include
│ └── spine
│ │ ├── Animation.h
│ │ ├── AnimationState.h
│ │ ├── AnimationStateData.h
│ │ ├── Atlas.h
│ │ ├── AtlasAttachmentLoader.h
│ │ ├── Attachment.h
│ │ ├── AttachmentLoader.h
│ │ ├── AttachmentTimeline.h
│ │ ├── AttachmentType.h
│ │ ├── BlendMode.h
│ │ ├── Bone.h
│ │ ├── BoneData.h
│ │ ├── BoundingBoxAttachment.h
│ │ ├── ClippingAttachment.h
│ │ ├── Color.h
│ │ ├── ColorTimeline.h
│ │ ├── ConstraintData.h
│ │ ├── ContainerUtil.h
│ │ ├── CurveTimeline.h
│ │ ├── Debug.h
│ │ ├── DeformTimeline.h
│ │ ├── DrawOrderTimeline.h
│ │ ├── Event.h
│ │ ├── EventData.h
│ │ ├── EventTimeline.h
│ │ ├── Extension.h
│ │ ├── HasRendererObject.h
│ │ ├── HashMap.h
│ │ ├── IkConstraint.h
│ │ ├── IkConstraintData.h
│ │ ├── IkConstraintTimeline.h
│ │ ├── Json.h
│ │ ├── LinkedMesh.h
│ │ ├── MathUtil.h
│ │ ├── MeshAttachment.h
│ │ ├── MixBlend.h
│ │ ├── MixDirection.h
│ │ ├── PathAttachment.h
│ │ ├── PathConstraint.h
│ │ ├── PathConstraintData.h
│ │ ├── PathConstraintMixTimeline.h
│ │ ├── PathConstraintPositionTimeline.h
│ │ ├── PathConstraintSpacingTimeline.h
│ │ ├── PointAttachment.h
│ │ ├── Pool.h
│ │ ├── PositionMode.h
│ │ ├── RTTI.h
│ │ ├── RegionAttachment.h
│ │ ├── RotateMode.h
│ │ ├── RotateTimeline.h
│ │ ├── ScaleTimeline.h
│ │ ├── ShearTimeline.h
│ │ ├── Skeleton.h
│ │ ├── SkeletonBinary.h
│ │ ├── SkeletonBounds.h
│ │ ├── SkeletonClipping.h
│ │ ├── SkeletonData.h
│ │ ├── SkeletonJson.h
│ │ ├── Skin.h
│ │ ├── Slot.h
│ │ ├── SlotData.h
│ │ ├── SpacingMode.h
│ │ ├── SpineObject.h
│ │ ├── SpineString.h
│ │ ├── TextureLoader.h
│ │ ├── Timeline.h
│ │ ├── TimelineType.h
│ │ ├── TransformConstraint.h
│ │ ├── TransformConstraintData.h
│ │ ├── TransformConstraintTimeline.h
│ │ ├── TransformMode.h
│ │ ├── TranslateTimeline.h
│ │ ├── Triangulator.h
│ │ ├── TwoColorTimeline.h
│ │ ├── Updatable.h
│ │ ├── Vector.h
│ │ ├── VertexAttachment.h
│ │ ├── VertexEffect.h
│ │ ├── Vertices.h
│ │ ├── dll.h
│ │ └── spine.h
│ └── src
│ └── spine
│ ├── Animation.cpp
│ ├── AnimationState.cpp
│ ├── AnimationStateData.cpp
│ ├── Atlas.cpp
│ ├── AtlasAttachmentLoader.cpp
│ ├── Attachment.cpp
│ ├── AttachmentLoader.cpp
│ ├── AttachmentTimeline.cpp
│ ├── Bone.cpp
│ ├── BoneData.cpp
│ ├── BoundingBoxAttachment.cpp
│ ├── ClippingAttachment.cpp
│ ├── ColorTimeline.cpp
│ ├── ConstraintData.cpp
│ ├── CurveTimeline.cpp
│ ├── DeformTimeline.cpp
│ ├── DrawOrderTimeline.cpp
│ ├── Event.cpp
│ ├── EventData.cpp
│ ├── EventTimeline.cpp
│ ├── Extension.cpp
│ ├── IkConstraint.cpp
│ ├── IkConstraintData.cpp
│ ├── IkConstraintTimeline.cpp
│ ├── Json.cpp
│ ├── LinkedMesh.cpp
│ ├── MathUtil.cpp
│ ├── MeshAttachment.cpp
│ ├── PathAttachment.cpp
│ ├── PathConstraint.cpp
│ ├── PathConstraintData.cpp
│ ├── PathConstraintMixTimeline.cpp
│ ├── PathConstraintPositionTimeline.cpp
│ ├── PathConstraintSpacingTimeline.cpp
│ ├── PointAttachment.cpp
│ ├── RTTI.cpp
│ ├── RegionAttachment.cpp
│ ├── RotateTimeline.cpp
│ ├── ScaleTimeline.cpp
│ ├── ShearTimeline.cpp
│ ├── Skeleton.cpp
│ ├── SkeletonBinary.cpp
│ ├── SkeletonBounds.cpp
│ ├── SkeletonClipping.cpp
│ ├── SkeletonData.cpp
│ ├── SkeletonJson.cpp
│ ├── Skin.cpp
│ ├── Slot.cpp
│ ├── SlotData.cpp
│ ├── SpineObject.cpp
│ ├── TextureLoader.cpp
│ ├── Timeline.cpp
│ ├── TransformConstraint.cpp
│ ├── TransformConstraintData.cpp
│ ├── TransformConstraintTimeline.cpp
│ ├── TranslateTimeline.cpp
│ ├── Triangulator.cpp
│ ├── TwoColorTimeline.cpp
│ ├── Updatable.cpp
│ ├── VertexAttachment.cpp
│ └── VertexEffect.cpp
└── test
└── boy
├── spineboy-ess.json
├── spineboy.atlas
└── spineboy.png
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | .vscode
3 | test/*.log
4 | Mac/cmake-build*/
5 | build/
6 | bin/
7 |
8 | #OS noise
9 | profile
10 | [Tt]humbs.db
11 | *.DS_Store
12 | *~
13 | *.swp
14 | *.out
15 | *.bak*
16 | *.lock
17 |
18 | #Other CSM
19 | .hg
20 | .svn
21 | CVS
22 | out
23 | Podfile_cp
24 |
25 | #Xcode noise
26 | *.log
27 | *~.nib
28 | *.moved-aside
29 | *.xcodeproj/*
30 | !*.xcodeproj/project.pbxproj
31 | xcshareddata
32 | *.xcworkspace/
33 | xcuserdata
34 |
35 | #Project files
36 | [Bb]uild/
37 | DerivedData/
38 | Products/
39 |
40 | #CocoaPods
41 | Pods
42 |
--------------------------------------------------------------------------------
/Android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 | .cxx
10 | local.properties
11 |
--------------------------------------------------------------------------------
/Android/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/Android/app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdkVersion 30
7 | buildToolsVersion "29.0.3"
8 |
9 | defaultConfig {
10 | applicationId "com.github.keith2018.animation.spine"
11 | minSdkVersion 16
12 | targetSdkVersion 30
13 | versionCode 1
14 | versionName "1.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | externalNativeBuild {
18 | cmake {
19 | cppFlags ""
20 | }
21 | }
22 | }
23 |
24 | buildTypes {
25 | release {
26 | minifyEnabled false
27 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
28 | }
29 | }
30 | externalNativeBuild {
31 | cmake {
32 | path "src/main/cpp/CMakeLists.txt"
33 | version "3.10.2"
34 | }
35 | }
36 | compileOptions {
37 | sourceCompatibility JavaVersion.VERSION_1_8
38 | targetCompatibility JavaVersion.VERSION_1_8
39 | }
40 | }
41 |
42 | dependencies {
43 |
44 | implementation 'androidx.appcompat:appcompat:1.2.0'
45 | implementation 'com.google.android.material:material:1.3.0'
46 | implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
47 | testImplementation 'junit:junit:4.+'
48 | androidTestImplementation 'androidx.test.ext:junit:1.1.2'
49 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
50 | }
--------------------------------------------------------------------------------
/Android/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/Android/app/src/androidTest/java/com/github/keith2018/animation/spine/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.github.keith2018.animation.spine;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 | assertEquals("com.github.keith2018.animation.spine", appContext.getPackageName());
25 | }
26 | }
--------------------------------------------------------------------------------
/Android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/Android/app/src/main/assets/boy/spineboy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/assets/boy/spineboy.png
--------------------------------------------------------------------------------
/Android/app/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # For more information about using CMake with Android Studio, read the
2 | # documentation: https://d.android.com/studio/projects/add-native-code.html
3 |
4 | # Sets the minimum version of CMake required to build the native library.
5 |
6 | cmake_minimum_required(VERSION 3.10.2)
7 |
8 | # Declares and names the project.
9 |
10 | project("spine")
11 |
12 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-exceptions -fno-rtti")
13 |
14 | add_definitions("-Wno-unused -Wno-deprecated-declarations")
15 |
16 | set(SPINE_MAIN_DIR ../../../../..)
17 |
18 | add_subdirectory(${SPINE_MAIN_DIR}/spine-cpp spine-cpp)
19 | add_subdirectory(${SPINE_MAIN_DIR}/render render)
20 |
21 |
22 | include_directories(
23 | ${SPINE_MAIN_DIR}/spine-cpp/spine-cpp/include
24 | ${SPINE_MAIN_DIR}/render
25 | )
26 |
27 | # Creates and names a library, sets it as either STATIC
28 | # or SHARED, and provides the relative paths to its source code.
29 | # You can define multiple libraries, and CMake builds them for you.
30 | # Gradle automatically packages shared libraries with your APK.
31 |
32 | add_library( # Sets the name of the library.
33 | native-lib
34 |
35 | # Sets the library as a shared library.
36 | SHARED
37 |
38 | # Provides a relative path to your source file(s).
39 | native-lib.cpp )
40 |
41 | # Searches for a specified prebuilt library and stores the path as a
42 | # variable. Because CMake includes system libraries in the search path by
43 | # default, you only need to specify the name of the public NDK library
44 | # you want to add. CMake verifies that the library exists before
45 | # completing its build.
46 |
47 | find_library( # Sets the name of the path variable.
48 | log-lib
49 |
50 | # Specifies the name of the NDK library that
51 | # you want CMake to locate.
52 | log )
53 |
54 | # Specifies libraries CMake should link to your target library. You
55 | # can link multiple libraries, such as libraries you define in this
56 | # build script, prebuilt third-party libraries, or system libraries.
57 |
58 | target_link_libraries( # Specifies the target library.
59 | native-lib
60 |
61 | # Links the target library to the log library
62 | # included in the NDK.
63 | ${log-lib}
64 |
65 | spine-render
66 | spine-cpp
67 | GLESv2
68 | android )
69 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/github/keith2018/animation/spine/GLRendererImpl.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | package com.github.keith2018.animation.spine;
11 |
12 | import android.content.Context;
13 | import android.content.res.AssetManager;
14 | import android.opengl.GLES20;
15 |
16 | public class GLRendererImpl implements GLProducerThread.GLRenderer {
17 |
18 | static {
19 | System.loadLibrary("native-lib");
20 | }
21 |
22 | private Context ctx;
23 | private int mWidth = 0;
24 | private int mHeight = 0;
25 | private long spineCtrl = 0;
26 |
27 | public GLRendererImpl(Context ctx) {
28 | this.ctx = ctx;
29 | }
30 |
31 | public void setViewport(int width, int height) {
32 | mWidth = width;
33 | mHeight = height;
34 | }
35 |
36 |
37 | @Override
38 | public boolean init() {
39 | spineCtrl = nativeLoadSpine(ctx.getAssets(), mWidth, mHeight);
40 | return spineCtrl != 0;
41 | }
42 |
43 | @Override
44 | public void drawFrame(float dt) {
45 | GLES20.glClearColor(0, 0, 0, 0);
46 | GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
47 | GLES20.glViewport(0, 0, mWidth, mHeight);
48 |
49 | if (spineCtrl != 0) {
50 | nativeDrawFrame(spineCtrl, dt);
51 | }
52 | }
53 |
54 | @Override
55 | public void destroy() {
56 | if (spineCtrl != 0) {
57 | nativeDestroy(spineCtrl);
58 | }
59 | }
60 |
61 |
62 | private native long nativeLoadSpine(AssetManager assetManager, int width, int height);
63 | private native void nativeDrawFrame(long spineCtrl, float dt);
64 | private native void nativeDestroy(long spineCtrl);
65 | }
66 |
--------------------------------------------------------------------------------
/Android/app/src/main/java/com/github/keith2018/animation/spine/MainActivity.java:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | package com.github.keith2018.animation.spine;
11 |
12 | import android.graphics.SurfaceTexture;
13 | import android.os.Bundle;
14 | import android.view.TextureView;
15 |
16 | import java.util.concurrent.atomic.AtomicBoolean;
17 |
18 | import androidx.appcompat.app.AppCompatActivity;
19 |
20 | public class MainActivity extends AppCompatActivity implements TextureView.SurfaceTextureListener {
21 |
22 | private TextureView mTextureView;
23 | private GLRendererImpl mRenderer;
24 | private GLProducerThread mProducerThread = null;
25 |
26 | @Override
27 | protected void onCreate(Bundle savedInstanceState) {
28 | super.onCreate(savedInstanceState);
29 | setContentView(R.layout.activity_main);
30 |
31 | mTextureView = findViewById(R.id.gl_textureView);
32 | mTextureView.setSurfaceTextureListener(this);
33 |
34 | mRenderer = new GLRendererImpl(this);
35 | }
36 |
37 | @Override
38 | public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) {
39 | mRenderer.setViewport(width, height);
40 | mProducerThread = new GLProducerThread(surface, mRenderer, new AtomicBoolean(true));
41 | mProducerThread.start();
42 | }
43 |
44 | @Override
45 | public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) {
46 | }
47 |
48 | @Override
49 | public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {
50 | mProducerThread.stopRender();
51 | mProducerThread = null;
52 | return true;
53 | }
54 |
55 | @Override
56 | public void onSurfaceTextureUpdated(SurfaceTexture surface) {
57 | }
58 | }
--------------------------------------------------------------------------------
/Android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
17 |
18 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/Android/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Spine Android
3 |
--------------------------------------------------------------------------------
/Android/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/Android/app/src/test/java/com/github/keith2018/animation/spine/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.github.keith2018.animation.spine;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/Android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath "com.android.tools.build:gradle:4.1.1"
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | task clean(type: Delete) {
23 | delete rootProject.buildDir
24 | }
--------------------------------------------------------------------------------
/Android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/Android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/Android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Mon Mar 29 19:08:36 CST 2021
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
7 |
--------------------------------------------------------------------------------
/Android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/Android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "Spine Android"
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 keith2018
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Mac/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.3)
2 | project(spine-mac)
3 |
4 | find_package(OpenGL REQUIRED)
5 |
6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-exceptions -fno-rtti")
7 |
8 | add_definitions("-Wno-unused -Wno-deprecated-declarations")
9 |
10 | add_subdirectory(../spine-cpp spine-cpp)
11 | add_subdirectory(../render render)
12 |
13 | include_directories(
14 | ${OPENGL_INCLUDE_DIRS}
15 | glfw/include
16 | ../spine-cpp/spine-cpp/include
17 | ../render
18 | )
19 |
20 | link_directories(
21 | glfw/lib-x86_64/
22 | )
23 |
24 | FILE(GLOB MAC_SRCS "./*")
25 | add_executable(spine-mac ${MAC_SRCS})
26 |
27 | target_link_libraries(spine-mac
28 | ${OPENGL_LIBRARIES}
29 | "-framework Cocoa"
30 | "-framework IOKit"
31 | glfw3
32 | spine-render
33 | spine-cpp
34 | )
35 |
--------------------------------------------------------------------------------
/Mac/SpineGLContext.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #include "SpineGLContext.h"
11 | #include "utils/Logger.h"
12 |
13 | void errorCb(int error, const char* desc) {
14 | LOG_ERROR("GLFW error %d: %s", error, desc);
15 | }
16 |
17 | bool SpineGLContext::create(int width, int height) {
18 | if (!glfwInit()) {
19 | LOG_ERROR("Failed to init GLFW.");
20 | return false;
21 | }
22 |
23 | glfwSetErrorCallback(errorCb);
24 |
25 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
26 | glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
27 | glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
28 | glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
29 | glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_TRUE); // transparent window
30 |
31 | _window = glfwCreateWindow(width, height, "SpineOpenGL", nullptr, nullptr);
32 | if (!_window) {
33 | LOG_ERROR("Failed to create window.");
34 | glfwTerminate();
35 | return false;
36 | }
37 | glfwMakeContextCurrent(_window);
38 | glfwSwapInterval(0);
39 | glfwSetTime(0);
40 |
41 | glfwGetWindowSize(_window, &_winWidth, &_winHeight);
42 | glfwGetFramebufferSize(_window, &_fbWidth, &_fbHeight);
43 | glViewport(0, 0, _fbWidth, _fbHeight);
44 |
45 | return true;
46 | }
47 |
48 | void SpineGLContext::destroy() {
49 | glfwTerminate();
50 | }
51 | void SpineGLContext::beforeDrawFrame() {
52 | glClearColor(0, 0, 0, 0.0);
53 | glClear(GL_COLOR_BUFFER_BIT);
54 | glViewport(0, 0, _fbWidth, _fbHeight);
55 | }
56 | void SpineGLContext::afterDrawFrame() {
57 | glfwSwapBuffers(_window);
58 | glfwPollEvents();
59 | }
60 |
--------------------------------------------------------------------------------
/Mac/SpineGLContext.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #ifndef SPINE_MAC__SPINEGLCONTEXT_H_
11 | #define SPINE_MAC__SPINEGLCONTEXT_H_
12 |
13 | #define GLFW_INCLUDE_GLEXT
14 | #include
15 |
16 | class SpineGLContext {
17 | public:
18 | bool create(int width, int height);
19 | void destroy();
20 |
21 | void beforeDrawFrame();
22 | void afterDrawFrame();
23 |
24 | private:
25 | GLFWwindow *_window;
26 |
27 | int _winWidth, _winHeight;
28 | int _fbWidth, _fbHeight;
29 |
30 | };
31 |
32 | #endif //SPINE_MAC__SPINEGLCONTEXT_H_
33 |
--------------------------------------------------------------------------------
/Mac/glfw/lib-x86_64/libglfw.3.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Mac/glfw/lib-x86_64/libglfw.3.dylib
--------------------------------------------------------------------------------
/Mac/glfw/lib-x86_64/libglfw3.a:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/Mac/glfw/lib-x86_64/libglfw3.a
--------------------------------------------------------------------------------
/Mac/main.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #include "SpineGLContext.h"
11 | #include "SpineController.h"
12 | #include "utils/Logger.h"
13 |
14 | #include
15 | #include
16 |
17 | #define WIDTH 300
18 | #define HEIGHT 400
19 |
20 | #define JSON_PATH "../../test/boy/spineboy-ess.json"
21 | #define ATLAS_PATH "../../test/boy/spineboy.atlas"
22 | #define SKIN_NAME "default"
23 | #define ANIM_NAME "idle"
24 | #define POS_X 120
25 | #define POS_Y 500
26 | #define SCALE 1.0
27 |
28 | #define FPS 30
29 | #define LOOP_TIME_SECOND 20
30 |
31 | int main(int argc, char *argv[]) {
32 | SpineGLContext glContext;
33 | bool glOk = glContext.create(WIDTH, HEIGHT);
34 | if (!glOk) {
35 | LOG_ERROR("create gl context failed");
36 | return -1;
37 | }
38 |
39 | SpineController spineCtrl(WIDTH, HEIGHT);
40 | bool createOk = spineCtrl.spineCreate(ATLAS_PATH, JSON_PATH, SKIN_NAME, POS_X, POS_Y, SCALE);
41 | if (!createOk) {
42 | LOG_ERROR("load spine resources failed");
43 | return -1;
44 | }
45 |
46 | createOk = spineCtrl.spineSetAnimation(ANIM_NAME);
47 | if (!createOk) {
48 | LOG_ERROR("set spine animation failed");
49 | return -1;
50 | }
51 |
52 | float frameIdx = 0;
53 | float delay = 1000.0f / FPS;
54 | std::chrono::system_clock::time_point a, b;
55 |
56 | while (frameIdx < FPS * LOOP_TIME_SECOND) {
57 | a = std::chrono::system_clock::now();
58 | std::chrono::duration work_time = a - b;
59 |
60 | if (work_time.count() < delay) {
61 | std::chrono::duration delta_ms(delay - work_time.count());
62 | auto delta_ms_duration = std::chrono::duration_cast(delta_ms);
63 | std::this_thread::sleep_for(std::chrono::milliseconds(delta_ms_duration.count()));
64 | }
65 |
66 | b = std::chrono::system_clock::now();
67 | std::chrono::duration sleep_time = b - a;
68 |
69 | glContext.beforeDrawFrame();
70 | spineCtrl.spineDraw(delay / 1000.0f);
71 | glContext.afterDrawFrame();
72 |
73 | frameIdx++;
74 | }
75 | spineCtrl.spineDestroy();
76 | glContext.destroy();
77 |
78 | return 0;
79 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Render Spine Animation Using OpenGL/OpenGL ES
2 | ## Background
3 |
4 | Spine is 2D skeletal animation software for video games with many kinds of runtime implement, see [https://github.com/EsotericSoftware/spine-runtimes](https://github.com/EsotericSoftware/spine-runtimes), here we render it with OpenGL/OpenGL ES on Mac/Android/iOS.
5 |
6 | The image resouces is loaded by stb_image, see [https://github.com/nothings/stb](https://github.com/nothings/stb)
7 |
8 |
9 | ## Build
10 | ### Mac
11 | The opengl context is created by GLFW (already included in the project).
12 |
13 | ```
14 | cd Mac
15 | mkdir build
16 | cd build
17 | cmake ..
18 | make
19 | ```
20 |
21 | 
22 |
23 | ### Android
24 | The opengl context is created by TextureView, no other dependency needed.
25 |
26 | ```
27 | cd Android
28 | // open with your AndroidStudio
29 | ```
30 |
31 | 
32 |
33 | ### iOS
34 | The opengl context is created by GLKView and render loop is drived by CADisplayLink.
35 |
36 | ```
37 | cd iOS
38 | // open with your XCode
39 | ```
40 |
41 | 
42 |
43 | ## License
44 | This code is licensed under the MIT License (see [LICENSE](LICENSE)).
45 |
--------------------------------------------------------------------------------
/iOS/Resources/Spine.bundle/boy/spineboy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/iOS/Resources/Spine.bundle/boy/spineboy.png
--------------------------------------------------------------------------------
/iOS/Spine iOS/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import
9 |
10 | @interface AppDelegate : UIResponder
11 |
12 |
13 | @end
14 |
15 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import "AppDelegate.h"
9 |
10 | @interface AppDelegate ()
11 |
12 | @end
13 |
14 | @implementation AppDelegate
15 |
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
18 | // Override point for customization after application launch.
19 | return YES;
20 | }
21 |
22 |
23 | #pragma mark - UISceneSession lifecycle
24 |
25 |
26 | - (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
27 | // Called when a new scene session is being created.
28 | // Use this method to select a configuration to create the new scene with.
29 | return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
30 | }
31 |
32 |
33 | - (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet *)sceneSessions {
34 | // Called when the user discards a scene session.
35 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
36 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
37 | }
38 |
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "scale" : "2x",
6 | "size" : "20x20"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "scale" : "3x",
11 | "size" : "20x20"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "scale" : "2x",
16 | "size" : "29x29"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "scale" : "3x",
21 | "size" : "29x29"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "scale" : "2x",
26 | "size" : "40x40"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "scale" : "3x",
31 | "size" : "40x40"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "scale" : "2x",
36 | "size" : "60x60"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "scale" : "3x",
41 | "size" : "60x60"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "scale" : "1x",
46 | "size" : "20x20"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "scale" : "2x",
51 | "size" : "20x20"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "scale" : "1x",
56 | "size" : "29x29"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "scale" : "2x",
61 | "size" : "29x29"
62 | },
63 | {
64 | "idiom" : "ipad",
65 | "scale" : "1x",
66 | "size" : "40x40"
67 | },
68 | {
69 | "idiom" : "ipad",
70 | "scale" : "2x",
71 | "size" : "40x40"
72 | },
73 | {
74 | "idiom" : "ipad",
75 | "scale" : "1x",
76 | "size" : "76x76"
77 | },
78 | {
79 | "idiom" : "ipad",
80 | "scale" : "2x",
81 | "size" : "76x76"
82 | },
83 | {
84 | "idiom" : "ipad",
85 | "scale" : "2x",
86 | "size" : "83.5x83.5"
87 | },
88 | {
89 | "idiom" : "ios-marketing",
90 | "scale" : "1x",
91 | "size" : "1024x1024"
92 | }
93 | ],
94 | "info" : {
95 | "author" : "xcode",
96 | "version" : 1
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE)
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UIApplicationSceneManifest
24 |
25 | UIApplicationSupportsMultipleScenes
26 |
27 | UISceneConfigurations
28 |
29 | UIWindowSceneSessionRoleApplication
30 |
31 |
32 | UISceneConfigurationName
33 | Default Configuration
34 | UISceneDelegateClassName
35 | SceneDelegate
36 | UISceneStoryboardFile
37 | Main
38 |
39 |
40 |
41 |
42 | UIApplicationSupportsIndirectInputEvents
43 |
44 | UILaunchStoryboardName
45 | LaunchScreen
46 | UIMainStoryboardFile
47 | Main
48 | UIRequiredDeviceCapabilities
49 |
50 | armv7
51 |
52 | UISupportedInterfaceOrientations
53 |
54 | UIInterfaceOrientationPortrait
55 | UIInterfaceOrientationLandscapeLeft
56 | UIInterfaceOrientationLandscapeRight
57 |
58 | UISupportedInterfaceOrientations~ipad
59 |
60 | UIInterfaceOrientationPortrait
61 | UIInterfaceOrientationPortraitUpsideDown
62 | UIInterfaceOrientationLandscapeLeft
63 | UIInterfaceOrientationLandscapeRight
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/SceneDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.h
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import
9 |
10 | @interface SceneDelegate : UIResponder
11 |
12 | @property (strong, nonatomic) UIWindow * window;
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/SceneDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.m
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import "SceneDelegate.h"
9 |
10 | @interface SceneDelegate ()
11 |
12 | @end
13 |
14 | @implementation SceneDelegate
15 |
16 |
17 | - (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
18 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
19 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
20 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
21 | }
22 |
23 |
24 | - (void)sceneDidDisconnect:(UIScene *)scene {
25 | // Called as the scene is being released by the system.
26 | // This occurs shortly after the scene enters the background, or when its session is discarded.
27 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
28 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
29 | }
30 |
31 |
32 | - (void)sceneDidBecomeActive:(UIScene *)scene {
33 | // Called when the scene has moved from an inactive state to an active state.
34 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
35 | }
36 |
37 |
38 | - (void)sceneWillResignActive:(UIScene *)scene {
39 | // Called when the scene will move from an active state to an inactive state.
40 | // This may occur due to temporary interruptions (ex. an incoming phone call).
41 | }
42 |
43 |
44 | - (void)sceneWillEnterForeground:(UIScene *)scene {
45 | // Called as the scene transitions from the background to the foreground.
46 | // Use this method to undo the changes made on entering the background.
47 | }
48 |
49 |
50 | - (void)sceneDidEnterBackground:(UIScene *)scene {
51 | // Called as the scene transitions from the foreground to the background.
52 | // Use this method to save data, release shared resources, and store enough scene-specific state information
53 | // to restore the scene back to its current state.
54 | }
55 |
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/ViewController.mm:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import "ViewController.h"
9 | #import "SpineController.h"
10 |
11 | #define JSON_PATH "Spine.bundle/boy/spineboy-ess.json"
12 | #define ATLAS_PATH "Spine.bundle/boy/spineboy.atlas"
13 | #define SKIN_NAME "default"
14 | #define ANIM_NAME "idle"
15 | #define POS_X 120
16 | #define POS_Y 800
17 | #define SCALE 1.5
18 |
19 |
20 | @interface ViewController ()
21 |
22 | @end
23 |
24 | @implementation ViewController
25 | {
26 | GLKView *_glView;
27 | SpineController *_spineCtrl;
28 |
29 | CADisplayLink * _displayLink;
30 | CFAbsoluteTime _currTime;
31 | }
32 |
33 | - (void)viewDidLoad {
34 | [super viewDidLoad];
35 |
36 | _glView = [[GLKView alloc] initWithFrame:self.view.bounds context:[[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]];
37 | [self.view addSubview:_glView];
38 |
39 | CGSize size = self.view.bounds.size;
40 | NSString *jsonPath = [[NSBundle mainBundle] pathForResource:@JSON_PATH ofType:nil];
41 | NSString *atlasPath = [[NSBundle mainBundle] pathForResource:@ATLAS_PATH ofType:nil];
42 |
43 | // create spine render
44 | [EAGLContext setCurrentContext:_glView.context];
45 | _spineCtrl = new SpineController(size.width, size.height);
46 | bool _createOk = _spineCtrl->spineCreate([atlasPath UTF8String], [jsonPath UTF8String], SKIN_NAME, POS_X, POS_Y, SCALE);
47 | if (!_createOk) {
48 | NSLog(@"load spine resources failed");
49 | return;
50 | }
51 |
52 | _createOk = _spineCtrl->spineSetAnimation(ANIM_NAME);
53 | if (!_createOk) {
54 | NSLog(@"set spine animation failed");
55 | return;
56 | }
57 |
58 | _currTime = 0;
59 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)];
60 | [_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
61 | }
62 |
63 | - (void)render:(CADisplayLink *)displayLink {
64 | glClearColor(1.0, 1.0, 1.0, 1.0);
65 | glClear(GL_COLOR_BUFFER_BIT);
66 |
67 | float dt = 0;
68 | if (_currTime > 0) {
69 | dt = CFAbsoluteTimeGetCurrent() - _currTime;
70 | }
71 |
72 | _spineCtrl->spineDraw(dt);
73 | _currTime = CFAbsoluteTimeGetCurrent();
74 |
75 | [_glView.context presentRenderbuffer:GL_RENDERBUFFER];
76 | }
77 |
78 |
79 | - (void)dealloc {
80 | [_displayLink invalidate];
81 | SAFE_DELETE(_spineCtrl);
82 | }
83 |
84 | @end
85 |
--------------------------------------------------------------------------------
/iOS/Spine iOS/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Spine iOS
4 | //
5 | // Created by keith2018 on 2021/3/29.
6 | //
7 |
8 | #import
9 | #import "AppDelegate.h"
10 |
11 | int main(int argc, char * argv[]) {
12 | NSString * appDelegateClassName;
13 | @autoreleasepool {
14 | // Setup code that might create autoreleased objects goes here.
15 | appDelegateClassName = NSStringFromClass([AppDelegate class]);
16 | }
17 | return UIApplicationMain(argc, argv, nil, appDelegateClassName);
18 | }
19 |
--------------------------------------------------------------------------------
/render/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | file(GLOB SOURCES "utils/*.h" "*.cpp")
2 |
3 | include_directories(
4 | ../spine-cpp/spine-cpp/include
5 | )
6 |
7 | add_library(spine-render STATIC ${SOURCES})
8 |
--------------------------------------------------------------------------------
/render/GLBatchRender.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #ifndef SPINE_RENDER_GLBATCHRENDER_H_
11 | #define SPINE_RENDER_GLBATCHRENDER_H_
12 |
13 | #if __APPLE__
14 | #include
15 | #if TARGET_OS_IPHONE
16 | #include
17 | #elif TARGET_OS_MAC
18 | #define SPINE_MAC
19 | #include
20 | #else
21 | // not support
22 | #endif
23 | #else
24 | #include
25 | #endif
26 |
27 | #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
28 | #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
29 |
30 | namespace SpineRender {
31 |
32 | struct OpenGLTexture {
33 | int width = 0;
34 | int height = 0;
35 | unsigned int textureId = 0;
36 | unsigned int minFilter = 0;
37 | unsigned int magFilter = 0;
38 | unsigned int uWrap = 0;
39 | unsigned int vWrap = 0;
40 | };
41 |
42 | struct OpenGLRenderState {
43 | unsigned int blendSrc = 0;
44 | unsigned int blendDst = 0;
45 | OpenGLTexture texture;
46 | };
47 |
48 | struct OpenGLVertex {
49 | float x;
50 | float y;
51 | float r;
52 | float g;
53 | float b;
54 | float a;
55 | float u;
56 | float v;
57 | };
58 |
59 | class GLBatchRender {
60 | public:
61 | GLBatchRender() : inited_(false), width_(1), height_(1) {};
62 |
63 | bool create(int width, int height);
64 | void draw(OpenGLVertex *vertices, int vertexCnt, OpenGLRenderState *state);
65 | void destroy();
66 |
67 | static bool createTexture(const char *path, OpenGLTexture *texture);
68 | static void releaseTexture(OpenGLTexture *texture);
69 |
70 | static unsigned int createTexture(int width, int height, unsigned char *buffer);
71 |
72 | private:
73 | bool initGL();
74 |
75 | private:
76 | bool inited_;
77 | int width_, height_;
78 | GLuint shaderProgram_;
79 | GLuint vbo_;
80 | GLuint texLoc_;
81 |
82 | OpenGLRenderState currState_;
83 |
84 | #ifdef SPINE_MAC
85 | GLuint vao_;
86 | #endif
87 | };
88 |
89 | }
90 |
91 | #endif //SPINE_RENDER_GLBATCHRENDER_H_
92 |
--------------------------------------------------------------------------------
/render/SkeletonDrawable.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #ifndef SPINE_RENDER_SKELETONDRAWABLE_H_
11 | #define SPINE_RENDER_SKELETONDRAWABLE_H_
12 |
13 | #include
14 | #include "GLBatchRender.h"
15 |
16 | namespace spine {
17 |
18 | struct GLBlendMode {
19 | GLBlendMode() = default;
20 | GLBlendMode(unsigned int src, unsigned int dst) : src(src), dst(dst) {}
21 |
22 | unsigned int src;
23 | unsigned int dst;
24 | };
25 |
26 | class SkeletonDrawable {
27 | public:
28 | SkeletonDrawable(SpineRender::GLBatchRender *render, SkeletonData *skeleton, AnimationStateData *stateData = nullptr);
29 | ~SkeletonDrawable();
30 |
31 | void update(float deltaTime);
32 | void draw();
33 |
34 | void setUsePremultipliedAlpha(bool usePMA) {
35 | usePremultipliedAlpha = usePMA;
36 | };
37 | bool getUsePremultipliedAlpha() {
38 | return usePremultipliedAlpha;
39 | };
40 |
41 | Skeleton *getSkeleton() const {
42 | return skeleton;
43 | }
44 | void setSkeleton(Skeleton *sk) {
45 | skeleton = sk;
46 | }
47 | float getTimeScale() const {
48 | return timeScale;
49 | }
50 | void setTimeScale(float scale) {
51 | timeScale = scale;
52 | }
53 |
54 | AnimationState *getState() const {
55 | return state;
56 | }
57 | void setState(AnimationState *s) {
58 | state = s;
59 | }
60 |
61 | private:
62 | void drawOpengl();
63 |
64 | private:
65 | mutable bool ownsAnimationStateData;
66 | mutable Vector worldVertices;
67 | mutable Vector tempUvs;
68 | mutable Vector tempColors;
69 | mutable Vector quadIndices;
70 | mutable SkeletonClipping clipper;
71 | mutable bool usePremultipliedAlpha;
72 |
73 | Skeleton *skeleton;
74 | AnimationState *state;
75 | float timeScale;
76 | Vector vertexArray;
77 | VertexEffect *vertexEffect;
78 |
79 | SpineRender::OpenGLRenderState _states;
80 | GLBlendMode _blendMode;
81 | SpineRender::GLBatchRender *_render;
82 | };
83 |
84 | class OpenGLTextureLoader : public TextureLoader {
85 | public:
86 | OpenGLTextureLoader() = default;
87 | void load(AtlasPage &page, const String &path) override;
88 | void unload(void *texture) override;
89 | };
90 |
91 | }
92 | #endif //SPINE_RENDER_SKELETONDRAWABLE_H_
93 |
--------------------------------------------------------------------------------
/render/SpineController.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #include "SpineController.h"
11 | #include "utils/Logger.h"
12 |
13 | char SpineRender::Logger::buf[MAX_LOG_LENGTH] = {};
14 | void *SpineRender::Logger::logContext = nullptr;
15 | SpineRender::LogFunc SpineRender::Logger::logFunc = nullptr;
16 |
17 | spine::SkeletonData *SpineController::spineReadSkeletonJsonData(const spine::String &filename,
18 | spine::Atlas *atlas,
19 | float scale) {
20 | spine::SkeletonJson json(atlas);
21 | json.setScale(scale);
22 | auto skeletonData = json.readSkeletonDataFile(filename);
23 | if (!skeletonData) {
24 | LOG_ERROR("readSkeletonDataFile failed: %s\n", json.getError().buffer());
25 | return nullptr;
26 | }
27 | return skeletonData;
28 | }
29 |
30 | bool SpineController::spineCreate(const char *atlasPath,
31 | const char *jsonPath,
32 | const char *skin,
33 | float posX,
34 | float posY,
35 | float scale,
36 | bool usePMA,
37 | float timeScale) {
38 | _textureLoader = new spine::OpenGLTextureLoader();
39 | _atlas = new spine::Atlas(atlasPath, _textureLoader);
40 | if (_atlas->getPages().size() == 0) {
41 | LOG_ERROR("Failed to load atlas");
42 | return false;
43 | }
44 |
45 | _skeletonData = spineReadSkeletonJsonData(jsonPath, _atlas, scale);
46 | if (_skeletonData == nullptr) {
47 | return false;
48 | }
49 |
50 | _drawable = new spine::SkeletonDrawable(_batchRender, _skeletonData);
51 | _drawable->setTimeScale(timeScale);
52 | _drawable->setUsePremultipliedAlpha(usePMA);
53 |
54 | spine::Skeleton *skeleton = _drawable->getSkeleton();
55 | skeleton->setPosition(posX, posY);
56 | skeleton->setSkin(skin);
57 | skeleton->updateWorldTransform();
58 |
59 | return true;
60 | }
61 |
62 | bool SpineController::spineSetAnimation(const char *animationName, int trackIndex, bool loop) {
63 | spine::Animation *animation = _skeletonData->findAnimation(animationName);
64 | if (animation == nullptr) {
65 | LOG_ERROR("Failed to find animation: %s", animationName);
66 | return false;
67 | }
68 | _drawable->getState()->setAnimation(trackIndex, animation, loop);
69 |
70 | return true;
71 | }
72 |
73 | void SpineController::spineDraw(float dt) {
74 | if (_drawable) {
75 | _drawable->update(dt);
76 | _drawable->draw();
77 | }
78 | }
79 |
80 | void SpineController::spineDestroy() {
81 | SAFE_DELETE(_skeletonData)
82 | SAFE_DELETE(_atlas)
83 | SAFE_DELETE(_drawable)
84 | SAFE_DELETE(_textureLoader)
85 | }
86 |
--------------------------------------------------------------------------------
/render/SpineController.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #ifndef SPINE_RENDER_SPINECONTROLLER_H_
11 | #define SPINE_RENDER_SPINECONTROLLER_H_
12 |
13 | #include "SkeletonDrawable.h"
14 | #include "GLBatchRender.h"
15 |
16 | class SpineController {
17 | public:
18 | SpineController(int width, int height) : _batchRender(new SpineRender::GLBatchRender()) {
19 | _batchRender->create(width, height);
20 | }
21 |
22 | ~SpineController() {
23 | _batchRender->destroy();
24 | delete _batchRender;
25 | _batchRender = nullptr;
26 | }
27 |
28 | bool spineCreate(const char *atlasPath,
29 | const char *jsonPath,
30 | const char *skin = "default",
31 | float posX = 0.0f,
32 | float posY = 0.0f,
33 | float scale = 1.0f,
34 | bool usePMA = true,
35 | float timeScale = 1.0f);
36 | bool spineSetAnimation(const char *animationName, int trackIndex = 0, bool loop = true);
37 | void spineDraw(float dt);
38 | void spineDestroy();
39 |
40 | private:
41 | static spine::SkeletonData *spineReadSkeletonJsonData(const spine::String &filename,
42 | spine::Atlas *atlas,
43 | float scale);
44 |
45 | private:
46 | spine::OpenGLTextureLoader *_textureLoader = nullptr;
47 | spine::SkeletonData *_skeletonData = nullptr;
48 | spine::Atlas *_atlas = nullptr;
49 | spine::SkeletonDrawable *_drawable = nullptr;
50 |
51 | SpineRender::GLBatchRender *_batchRender = nullptr;
52 | };
53 |
54 | #endif //SPINE_RENDER_SPINECONTROLLER_H_
55 |
--------------------------------------------------------------------------------
/render/utils/Logger.h:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * Spine OpenGL
4 | *
5 | * @author : keith@robot9.me
6 | * @date : 2021/03/30
7 | *
8 | */
9 |
10 | #ifndef SPINE_RENDER_LOGGER_H
11 | #define SPINE_RENDER_LOGGER_H
12 |
13 | #include
14 | #include
15 | #include
16 |
17 | namespace SpineRender {
18 |
19 | #define MAX_LOG_LENGTH 1024
20 | #define LOG_SOURCE_LINE
21 |
22 | #define __FILENAME__ (strrchr(__FILE__, '/') ? (strrchr(__FILE__, '/') + 1):__FILE__)
23 |
24 | #define LOG_INFO(...) SpineRender::Logger::log(SpineRender::INFO, __FILENAME__, __LINE__, __VA_ARGS__)
25 | #define LOG_WARNING(...) SpineRender::Logger::log(SpineRender::WARNING, __FILENAME__, __LINE__, __VA_ARGS__)
26 | #define LOG_ERROR(...) SpineRender::Logger::log(SpineRender::ERROR, __FILENAME__, __LINE__, __VA_ARGS__)
27 | #define LOG_FATAL(...) SpineRender::Logger::log(SpineRender::FATAL, __FILENAME__, __LINE__, __VA_ARGS__)
28 |
29 | enum LogLevel {
30 | INFO,
31 | WARNING,
32 | ERROR,
33 | FATAL
34 | };
35 |
36 | typedef void (*LogFunc)(void *context, int level, const char *msg);
37 |
38 | class Logger {
39 | public:
40 | static void setLogFunc(void *ctx, LogFunc func) {
41 | logContext = ctx;
42 | logFunc = func;
43 | }
44 |
45 | static void log(LogLevel level, const char *file, int line, const char *message, ...) {
46 | va_list argPtr;
47 | va_start(argPtr, message);
48 | vsnprintf(buf, MAX_LOG_LENGTH - 1, message, argPtr);
49 | va_end(argPtr);
50 | buf[MAX_LOG_LENGTH - 1] = '\0';
51 |
52 | if (logFunc != nullptr) {
53 | logFunc(logContext, level, buf);
54 | return;
55 | }
56 |
57 | switch (level) {
58 | #ifdef LOG_SOURCE_LINE
59 | case INFO: fprintf(stdout, "[SpineRender][INFO] %s:%d: %s\n", file, line, buf); break;
60 | case WARNING: fprintf(stdout, "[SpineRender][WARNING] %s:%d: %s\n", file, line, buf); break;
61 | case ERROR: fprintf(stderr, "[SpineRender][ERROR] %s:%d: %s\n", file, line, buf); break;
62 | case FATAL: fprintf(stderr, "[SpineRender][FATAL] %s:%d: %s\n", file, line, buf); break;
63 | #else
64 | case INFO: fprintf(stdout, "[SpineRender][INFO] : %s\n", buf); break;
65 | case WARNING: fprintf(stdout, "[SpineRender][WARNING] : %s\n", buf); break;
66 | case ERROR: fprintf(stderr, "[SpineRender][ERROR] : %s\n", buf); break;
67 | case FATAL: fprintf(stderr, "[SpineRender][FATAL] : %s\n", buf); break;
68 | #endif
69 | }
70 | }
71 |
72 | private:
73 | static void *logContext;
74 | static LogFunc logFunc;
75 |
76 | static char buf[MAX_LOG_LENGTH];
77 | };
78 |
79 | }
80 |
81 | #endif //SPINE_RENDER_LOGGER_H
82 |
--------------------------------------------------------------------------------
/screenshot/Android.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/screenshot/Android.png
--------------------------------------------------------------------------------
/screenshot/Mac.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/screenshot/Mac.png
--------------------------------------------------------------------------------
/screenshot/iOS.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/screenshot/iOS.jpeg
--------------------------------------------------------------------------------
/spine-cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(MSVC)
2 | message("MSCV detected")
3 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
4 | set (CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS}")
5 | else()
6 | set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c89")
7 | set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -std=c++03 -fno-exceptions -fno-rtti")
8 | endif()
9 |
10 | include_directories(include)
11 | file(GLOB INCLUDES "spine-cpp/include/**/*.h")
12 | file(GLOB SOURCES "spine-cpp/src/**/*.cpp")
13 |
14 | add_library(spine-cpp STATIC ${SOURCES} ${INCLUDES})
15 | target_include_directories(spine-cpp PUBLIC spine-cpp/include)
16 | install(TARGETS spine-cpp DESTINATION dist/lib)
17 | install(FILES ${INCLUDES} DESTINATION dist/include)
--------------------------------------------------------------------------------
/spine-cpp/LICENSE:
--------------------------------------------------------------------------------
1 | Spine Runtimes License Agreement
2 | Last updated May 1, 2019. Replaces all prior versions.
3 |
4 | Copyright (c) 2013-2019, Esoteric Software LLC
5 |
6 | Integration of the Spine Runtimes into software or otherwise creating
7 | derivative works of the Spine Runtimes is permitted under the terms and
8 | conditions of Section 2 of the Spine Editor License Agreement:
9 | http://esotericsoftware.com/spine-editor-license
10 |
11 | Otherwise, it is permitted to integrate the Spine Runtimes into software
12 | or otherwise create derivative works of the Spine Runtimes (collectively,
13 | "Products"), provided that each user of the Products must obtain their own
14 | Spine Editor license and redistribution of the Products in any form must
15 | include this license and copyright notice.
16 |
17 | THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY EXPRESS
18 | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
20 | NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, BUSINESS
23 | INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND ON ANY
24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/spine-cpp/README.md:
--------------------------------------------------------------------------------
1 | # spine-cpp
2 |
3 | The spine-cpp runtime provides basic functionality to load and manipulate [spine](http://esotericsoftware.com) skeletal animation data using C++. It does not perform rendering but can be extended to enable spine animations for other projects that utilize C++. Note, this library uses C++03 for maximum portability and therefore does not take advantage of any C++11 or newer features such as std::unique_ptr.
4 |
5 | ## Licensing
6 |
7 | You are welcome to evaluate the Spine Runtimes and the examples we provide in this repository free of charge.
8 |
9 | You can integrate the Spine Runtimes into your software free of charge, but users of your software must have their own [Spine license](https://esotericsoftware.com/spine-purchase). Please make your users aware of this requirement! This option is often chosen by those making development tools, such as an SDK, game toolkit, or software library.
10 |
11 | In order to distribute your software containing the Spine Runtimes to others that don't have a Spine license, you need a [Spine license](https://esotericsoftware.com/spine-purchase) at the time of integration. Then you can distribute your software containing the Spine Runtimes however you like, provided others don't modify it or use it to create new software. If others want to do that, they'll need their own Spine license.
12 |
13 | For the official legal terms governing the Spine Runtimes, please read the [Spine Runtimes License Agreement](http://esotericsoftware.com/spine-runtimes-license) and Section 2 of the [Spine Editor License Agreement](http://esotericsoftware.com/spine-editor-license#s2).
14 |
15 | ## Spine version
16 |
17 | spine-cpp works with data exported from spine 3.8.xx.
18 |
19 | spine-cpp supports all spine features.
20 |
21 | ## Setup
22 |
23 | 1. Download the spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it as a zip via the download button above.
24 | 2. Copy the contents of the `spine-cpp/spine-cpp/src` and `spine-cpp/spine-cpp/include` directories into your project. Be sure your header search is configured to find the contents of the `spine-cpp/spine-cpp/include` directory. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.
25 |
26 | ## Usage
27 | ### [Please see the spine-cpp guide for full documentation](http://esotericsoftware.com/spine-cpp)
28 |
29 | ## Extension
30 |
31 | Extending spine-cpp requires implementing both the `SpineExtension` class and the TextureLoader class:
32 |
33 | ```
34 | #include
35 | void spine::SpineExtension *spine::getDefaultExtension() {
36 | return new spine::DefaultExtension();
37 | }
38 |
39 | class MyTextureLoader : public spine::TextureLoader
40 | {
41 | virtual void load(spine::AtlasPage& page, const spine::String& path) {
42 | void* texture = ... load the texture based on path ...
43 | page->setRendererObject(texture); // use the texture later in your rendering code
44 | }
45 |
46 | virtual void unload(void* texture) { // TODO }
47 | };
48 | ```
49 |
50 | ## Runtimes extending spine-cpp
51 |
52 | - [spine-sfml](../spine-sfml/cpp)
53 | - [spine-cocos2dx](../spine-cocos2dx)
54 | - [spine-ue4](../spine-ue4)
55 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp-unit-tests/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 2.8.9)
2 | project(spine_cpp_unit_test)
3 |
4 | set(CMAKE_INSTALL_PREFIX "./")
5 | set(CMAKE_VERBOSE_MAKEFILE ON)
6 |
7 | include_directories(../spine-cpp/include teamcity minicppunit tests memory)
8 |
9 | set(SRC
10 | src/main.cpp
11 | )
12 |
13 | add_executable(spine_cpp_unit_test ${SRC})
14 | target_link_libraries(spine_cpp_unit_test spine-cpp)
15 |
16 |
17 | #########################################################
18 | # copy resources to build output directory
19 | #########################################################
20 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
21 | COMMAND ${CMAKE_COMMAND} -E copy_directory
22 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/spineboy/export $/testdata/spineboy)
23 |
24 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
25 | COMMAND ${CMAKE_COMMAND} -E copy_directory
26 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/raptor/export $/testdata/raptor)
27 |
28 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
29 | COMMAND ${CMAKE_COMMAND} -E copy_directory
30 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/goblins/export $/testdata/goblins)
31 |
32 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
33 | COMMAND ${CMAKE_COMMAND} -E copy_directory
34 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/coin/export $/testdata/coin)
35 |
36 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
37 | COMMAND ${CMAKE_COMMAND} -E copy_directory
38 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/tank/export $/testdata/tank)
39 |
40 | add_custom_command(TARGET spine_cpp_unit_test PRE_BUILD
41 | COMMAND ${CMAKE_COMMAND} -E copy_directory
42 | ${CMAKE_CURRENT_LIST_DIR}/../../examples/stretchyman/export $/testdata/stretchyman)
43 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Attachment.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Attachment_h
31 | #define Spine_Attachment_h
32 |
33 | #include
34 | #include
35 | #include
36 |
37 | namespace spine {
38 | class SP_API Attachment : public SpineObject {
39 | RTTI_DECL
40 |
41 | public:
42 | explicit Attachment(const String &name);
43 |
44 | virtual ~Attachment();
45 |
46 | const String &getName() const;
47 |
48 | virtual Attachment* copy() = 0;
49 |
50 | int getRefCount();
51 | void reference();
52 | void dereference();
53 |
54 | private:
55 | const String _name;
56 | int _refCount;
57 | };
58 | }
59 |
60 | #endif /* Spine_Attachment_h */
61 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/AttachmentTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_AttachmentTimeline_h
31 | #define Spine_AttachmentTimeline_h
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 |
40 | namespace spine {
41 |
42 | class Skeleton;
43 | class Slot;
44 | class Event;
45 |
46 | class SP_API AttachmentTimeline : public Timeline {
47 | friend class SkeletonBinary;
48 | friend class SkeletonJson;
49 |
50 | RTTI_DECL
51 |
52 | public:
53 | explicit AttachmentTimeline(int frameCount);
54 |
55 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
56 |
57 | virtual int getPropertyId();
58 |
59 | /// Sets the time and value of the specified keyframe.
60 | void setFrame(int frameIndex, float time, const String& attachmentName);
61 |
62 | size_t getSlotIndex();
63 | void setSlotIndex(size_t inValue);
64 | Vector& getFrames();
65 | Vector& getAttachmentNames();
66 | size_t getFrameCount();
67 | private:
68 | size_t _slotIndex;
69 | Vector _frames;
70 | Vector _attachmentNames;
71 |
72 | void setAttachment(Skeleton& skeleton, Slot& slot, String* attachmentName);
73 | };
74 | }
75 |
76 | #endif /* Spine_AttachmentTimeline_h */
77 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/AttachmentType.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_AttachmentType_h
31 | #define Spine_AttachmentType_h
32 |
33 | namespace spine {
34 | enum AttachmentType {
35 | AttachmentType_Region,
36 | AttachmentType_Boundingbox,
37 | AttachmentType_Mesh,
38 | AttachmentType_Linkedmesh,
39 | AttachmentType_Path,
40 | AttachmentType_Point,
41 | AttachmentType_Clipping
42 | };
43 | }
44 |
45 | #endif /* Spine_AttachmentType_h */
46 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/BlendMode.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_BlendMode_h
31 | #define Spine_BlendMode_h
32 |
33 | namespace spine {
34 | enum BlendMode {
35 | BlendMode_Normal = 0,
36 | BlendMode_Additive,
37 | BlendMode_Multiply,
38 | BlendMode_Screen
39 | };
40 | }
41 |
42 | #endif /* Spine_BlendMode_h */
43 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/BoundingBoxAttachment.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_BoundingBoxAttachment_h
31 | #define Spine_BoundingBoxAttachment_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | /// Attachment that has a polygon for bounds checking.
38 | class SP_API BoundingBoxAttachment : public VertexAttachment {
39 | RTTI_DECL
40 |
41 | explicit BoundingBoxAttachment(const String& name);
42 |
43 | virtual Attachment* copy();
44 | };
45 | }
46 |
47 | #endif /* Spine_BoundingBoxAttachment_h */
48 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/ClippingAttachment.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_ClippingAttachment_h
31 | #define Spine_ClippingAttachment_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SlotData;
37 |
38 | class SP_API ClippingAttachment : public VertexAttachment {
39 | friend class SkeletonBinary;
40 | friend class SkeletonJson;
41 |
42 | friend class SkeletonClipping;
43 |
44 | RTTI_DECL
45 |
46 | public:
47 | explicit ClippingAttachment(const String& name);
48 |
49 | SlotData* getEndSlot();
50 | void setEndSlot(SlotData* inValue);
51 |
52 | virtual Attachment* copy();
53 |
54 | private:
55 | SlotData* _endSlot;
56 | };
57 | }
58 |
59 | #endif /* Spine_ClippingAttachment_h */
60 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Color.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef SPINE_COLOR_H
31 | #define SPINE_COLOR_H
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API Color : public SpineObject {
37 | public:
38 | Color() : r(0), g(0), b(0), a(0) {
39 | }
40 |
41 | Color(float r, float g, float b, float a) : r(r), g(g), b(b), a(a) {
42 | clamp();
43 | }
44 |
45 | inline Color &set(float _r, float _g, float _b, float _a) {
46 | this->r = _r;
47 | this->g = _g;
48 | this->b = _b;
49 | this->a = _a;
50 | clamp();
51 | return *this;
52 | }
53 |
54 | inline Color &set(const Color &other) {
55 | r = other.r;
56 | g = other.g;
57 | b = other.b;
58 | a = other.a;
59 | clamp();
60 | return *this;
61 | }
62 |
63 | inline Color &add(float _r, float _g, float _b, float _a) {
64 | this->r += _r;
65 | this->g += _g;
66 | this->b += _b;
67 | this->a += _a;
68 | clamp();
69 | return *this;
70 | }
71 |
72 | inline Color &add(const Color &other) {
73 | r += other.r;
74 | g += other.g;
75 | b += other.b;
76 | a += other.a;
77 | clamp();
78 | return *this;
79 | }
80 |
81 | inline Color &clamp() {
82 | r = MathUtil::clamp(this->r, 0, 1);
83 | g = MathUtil::clamp(this->g, 0, 1);
84 | b = MathUtil::clamp(this->b, 0, 1);
85 | a = MathUtil::clamp(this->a, 0, 1);
86 | return *this;
87 | }
88 |
89 | float r, g, b, a;
90 | };
91 | }
92 |
93 |
94 | #endif //SPINE_COLOR_H
95 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/ColorTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_ColorTimeline_h
31 | #define Spine_ColorTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API ColorTimeline : public CurveTimeline {
37 | friend class SkeletonBinary;
38 |
39 | friend class SkeletonJson;
40 |
41 | RTTI_DECL
42 |
43 | public:
44 | static const int ENTRIES;
45 |
46 | explicit ColorTimeline(int frameCount);
47 |
48 | virtual void
49 | apply(Skeleton &skeleton, float lastTime, float time, Vector *pEvents, float alpha, MixBlend blend,
50 | MixDirection direction);
51 |
52 | virtual int getPropertyId();
53 |
54 | /// Sets the time and value of the specified keyframe.
55 | void setFrame(int frameIndex, float time, float r, float g, float b, float a);
56 |
57 | int getSlotIndex();
58 |
59 | void setSlotIndex(int inValue);
60 |
61 | Vector &getFrames();
62 |
63 | protected:
64 | static const int PREV_TIME;
65 | static const int PREV_R;
66 | static const int PREV_G;
67 | static const int PREV_B;
68 | static const int PREV_A;
69 | static const int R;
70 | static const int G;
71 | static const int B;
72 | static const int A;
73 |
74 | private:
75 | int _slotIndex;
76 | Vector _frames;
77 | };
78 | }
79 |
80 | #endif /* Spine_ColorTimeline_h */
81 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/ConstraintData.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Constraint_h
31 | #define Spine_Constraint_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | /// The interface for all constraints.
38 | class SP_API ConstraintData : public SpineObject {
39 |
40 | public:
41 | ConstraintData(const String& name);
42 |
43 | virtual ~ConstraintData();
44 |
45 | /// The IK constraint's name, which is unique within the skeleton.
46 | const String& getName();
47 |
48 | /// The ordinal for the order a skeleton's constraints will be applied.
49 | size_t getOrder();
50 | void setOrder(size_t inValue);
51 |
52 | /// Whether the constraint is only active for a specific skin.
53 | bool isSkinRequired();
54 | void setSkinRequired(bool inValue);
55 |
56 | private:
57 | const String _name;
58 | size_t _order;
59 | bool _skinRequired;
60 | };
61 | }
62 |
63 | #endif /* Spine_Constraint_h */
64 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/DeformTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_DeformTimeline_h
31 | #define Spine_DeformTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class VertexAttachment;
37 |
38 | class SP_API DeformTimeline : public CurveTimeline {
39 | friend class SkeletonBinary;
40 | friend class SkeletonJson;
41 |
42 | RTTI_DECL
43 |
44 | public:
45 | explicit DeformTimeline(int frameCount);
46 |
47 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
48 |
49 | virtual int getPropertyId();
50 |
51 | /// Sets the time and value of the specified keyframe.
52 | void setFrame(int frameIndex, float time, Vector& vertices);
53 |
54 | int getSlotIndex();
55 | void setSlotIndex(int inValue);
56 | Vector& getFrames();
57 | Vector< Vector >& getVertices();
58 | VertexAttachment* getAttachment();
59 | void setAttachment(VertexAttachment* inValue);
60 |
61 | private:
62 | int _slotIndex;
63 | Vector _frames;
64 | Vector< Vector > _frameVertices;
65 | VertexAttachment* _attachment;
66 | };
67 | }
68 |
69 | #endif /* Spine_DeformTimeline_h */
70 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/DrawOrderTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_DrawOrderTimeline_h
31 | #define Spine_DrawOrderTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API DrawOrderTimeline : public Timeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit DrawOrderTimeline(int frameCount);
44 |
45 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
46 |
47 | virtual int getPropertyId();
48 |
49 | /// Sets the time and value of the specified keyframe.
50 | /// @param drawOrder May be NULL to use bind pose draw order
51 | void setFrame(size_t frameIndex, float time, Vector& drawOrder);
52 |
53 | Vector& getFrames();
54 | Vector< Vector >& getDrawOrders();
55 | size_t getFrameCount();
56 |
57 | private:
58 | Vector _frames;
59 | Vector< Vector > _drawOrders;
60 | };
61 | }
62 |
63 | #endif /* Spine_DrawOrderTimeline_h */
64 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Event.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Event_h
31 | #define Spine_Event_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | class EventData;
38 |
39 | /// Stores the current pose values for an Event.
40 | class SP_API Event : public SpineObject {
41 | friend class SkeletonBinary;
42 |
43 | friend class SkeletonJson;
44 |
45 | friend class AnimationState;
46 |
47 | public:
48 | Event(float time, const EventData &data);
49 |
50 | const EventData &getData();
51 |
52 | /// The animation time this event was keyed.
53 | float getTime();
54 |
55 | int getIntValue();
56 |
57 | void setIntValue(int inValue);
58 |
59 | float getFloatValue();
60 |
61 | void setFloatValue(float inValue);
62 |
63 | const String &getStringValue();
64 |
65 | void setStringValue(const String &inValue);
66 |
67 | float getVolume();
68 |
69 | void setVolume(float inValue);
70 |
71 | float getBalance();
72 |
73 | void setBalance(float inValue);
74 |
75 | private:
76 | const EventData &_data;
77 | const float _time;
78 | int _intValue;
79 | float _floatValue;
80 | String _stringValue;
81 | float _volume;
82 | float _balance;
83 | };
84 | }
85 |
86 | #endif /* Spine_Event_h */
87 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/EventData.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_EventData_h
31 | #define Spine_EventData_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | /// Stores the setup pose values for an Event.
38 | class SP_API EventData : public SpineObject {
39 | friend class SkeletonBinary;
40 |
41 | friend class SkeletonJson;
42 |
43 | friend class Event;
44 |
45 | public:
46 | explicit EventData(const String &name);
47 |
48 | /// The name of the event, which is unique within the skeleton.
49 | const String &getName() const;
50 |
51 | int getIntValue();
52 |
53 | void setIntValue(int inValue);
54 |
55 | float getFloatValue();
56 |
57 | void setFloatValue(float inValue);
58 |
59 | const String &getStringValue();
60 |
61 | void setStringValue(const String &inValue);
62 |
63 | const String &getAudioPath();
64 |
65 | void setAudioPath(const String &inValue);
66 |
67 | float getVolume();
68 |
69 | void setVolume(float inValue);
70 |
71 | float getBalance();
72 |
73 | void setBalance(float inValue);
74 |
75 | private:
76 | const String _name;
77 | int _intValue;
78 | float _floatValue;
79 | String _stringValue;
80 | String _audioPath;
81 | float _volume;
82 | float _balance;
83 | };
84 | }
85 |
86 | #endif /* Spine_EventData_h */
87 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/EventTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_EventTimeline_h
31 | #define Spine_EventTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API EventTimeline : public Timeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit EventTimeline(int frameCount);
44 |
45 | ~EventTimeline();
46 |
47 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
48 |
49 | virtual int getPropertyId();
50 |
51 | /// Sets the time and value of the specified keyframe.
52 | void setFrame(size_t frameIndex, Event* event);
53 |
54 | Vector getFrames();
55 | Vector& getEvents();
56 | size_t getFrameCount();
57 |
58 | private:
59 | Vector _frames;
60 | Vector _events;
61 | };
62 | }
63 |
64 | #endif /* Spine_EventTimeline_h */
65 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/HasRendererObject.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_HasRendererObject_h
31 | #define Spine_HasRendererObject_h
32 |
33 | namespace spine {
34 |
35 | typedef void (*DisposeRendererObject) (void* rendererObject);
36 |
37 | class SP_API HasRendererObject {
38 | public:
39 | explicit HasRendererObject() : _rendererObject(NULL), _dispose(NULL) {};
40 |
41 | virtual ~HasRendererObject() {
42 | if (_dispose && _rendererObject)
43 | _dispose(_rendererObject);
44 | }
45 |
46 | void* getRendererObject() { return _rendererObject; }
47 | void setRendererObject(void* rendererObject, DisposeRendererObject dispose = NULL) {
48 | if (_dispose && _rendererObject && _rendererObject != rendererObject)
49 | _dispose(_rendererObject);
50 |
51 | _rendererObject = rendererObject;
52 | _dispose = dispose;
53 | }
54 | private:
55 | void *_rendererObject;
56 | DisposeRendererObject _dispose;
57 | };
58 |
59 | }
60 |
61 | #endif
62 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/IkConstraintTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_IkConstraintTimeline_h
31 | #define Spine_IkConstraintTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 |
37 | class SP_API IkConstraintTimeline : public CurveTimeline {
38 | friend class SkeletonBinary;
39 | friend class SkeletonJson;
40 |
41 | RTTI_DECL
42 |
43 | public:
44 | static const int ENTRIES;
45 |
46 | explicit IkConstraintTimeline(int frameCount);
47 |
48 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
49 |
50 | virtual int getPropertyId();
51 |
52 | /// Sets the time, mix and bend direction of the specified keyframe.
53 | void setFrame (int frameIndex, float time, float mix, float softness, int bendDirection, bool compress, bool stretch);
54 |
55 | private:
56 | static const int PREV_TIME;
57 | static const int PREV_MIX;
58 | static const int PREV_SOFTNESS;
59 | static const int PREV_BEND_DIRECTION;
60 | static const int PREV_COMPRESS;
61 | static const int PREV_STRETCH;
62 | static const int MIX;
63 | static const int SOFTNESS;
64 | static const int BEND_DIRECTION;
65 | static const int COMPRESS;
66 | static const int STRETCH;
67 |
68 | Vector _frames;
69 | int _ikConstraintIndex;
70 | };
71 | }
72 |
73 | #endif /* Spine_IkConstraintTimeline_h */
74 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/LinkedMesh.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_LinkedMesh_h
31 | #define Spine_LinkedMesh_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | class MeshAttachment;
38 |
39 | class SP_API LinkedMesh : public SpineObject {
40 | friend class SkeletonBinary;
41 |
42 | friend class SkeletonJson;
43 |
44 | public:
45 | LinkedMesh(MeshAttachment *mesh, const String &skin, size_t slotIndex, const String &parent, bool inheritDeform);
46 |
47 | private:
48 | MeshAttachment *_mesh;
49 | String _skin;
50 | size_t _slotIndex;
51 | String _parent;
52 | bool _inheritDeform;
53 | };
54 | }
55 |
56 | #endif /* Spine_LinkedMesh_h */
57 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/MixBlend.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_MixPose_h
31 | #define Spine_MixPose_h
32 |
33 | namespace spine {
34 |
35 | /// Controls how a timeline is mixed with the setup or current pose.
36 | /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, Blend, MixDirection)
37 | enum MixBlend {
38 | MixBlend_Setup = 0,
39 | MixBlend_First,
40 | MixBlend_Replace,
41 | MixBlend_Add
42 | };
43 | }
44 |
45 | #endif /* Spine_MixPose_h */
46 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/MixDirection.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_MixDirection_h
31 | #define Spine_MixDirection_h
32 |
33 | namespace spine {
34 |
35 | /// Indicates whether a timeline's alpha is mixing out over time toward 0 (the setup or current pose) or mixing in toward 1 (the timeline's pose).
36 | /// See also Timeline::apply(Skeleton&, float, float, Vector&, float, MixPose, MixDirection)
37 | enum MixDirection {
38 | MixDirection_In = 0,
39 | MixDirection_Out
40 | };
41 |
42 | }
43 |
44 | #endif /* Spine_MixDirection_h */
45 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PathAttachment.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PathAttachment_h
31 | #define Spine_PathAttachment_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API PathAttachment : public VertexAttachment {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit PathAttachment(const String& name);
44 |
45 | /// The length in the setup pose from the start of the path to the end of each curve.
46 | Vector& getLengths();
47 | bool isClosed();
48 | void setClosed(bool inValue);
49 | bool isConstantSpeed();
50 | void setConstantSpeed(bool inValue);
51 |
52 | virtual Attachment* copy();
53 | private:
54 | Vector _lengths;
55 | bool _closed;
56 | bool _constantSpeed;
57 | };
58 | }
59 |
60 | #endif /* Spine_PathAttachment_h */
61 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PathConstraintMixTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PathConstraintMixTimeline_h
31 | #define Spine_PathConstraintMixTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | #define SP_PATHCONSTRAINTMIXTIMELINE_ENTRIES 5
37 |
38 | class SP_API PathConstraintMixTimeline : public CurveTimeline {
39 | friend class SkeletonBinary;
40 | friend class SkeletonJson;
41 |
42 | RTTI_DECL
43 |
44 | public:
45 | static const int ENTRIES;
46 |
47 | explicit PathConstraintMixTimeline(int frameCount);
48 |
49 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
50 |
51 | virtual int getPropertyId();
52 |
53 | private:
54 | static const int PREV_TIME;
55 | static const int PREV_ROTATE;
56 | static const int PREV_TRANSLATE;
57 | static const int ROTATE;
58 | static const int TRANSLATE;
59 |
60 | Vector _frames;
61 | int _pathConstraintIndex;
62 |
63 | /// Sets the time and mixes of the specified keyframe.
64 | void setFrame(int frameIndex, float time, float rotateMix, float translateMix);
65 | };
66 | }
67 |
68 | #endif /* Spine_PathConstraintMixTimeline_h */
69 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PathConstraintPositionTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PathConstraintPositionTimeline_h
31 | #define Spine_PathConstraintPositionTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 |
37 | class SP_API PathConstraintPositionTimeline : public CurveTimeline {
38 | friend class SkeletonBinary;
39 | friend class SkeletonJson;
40 |
41 | RTTI_DECL
42 |
43 | public:
44 | static const int ENTRIES;
45 |
46 | explicit PathConstraintPositionTimeline(int frameCount);
47 |
48 | virtual ~PathConstraintPositionTimeline();
49 |
50 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
51 |
52 | virtual int getPropertyId();
53 |
54 | /// Sets the time and value of the specified keyframe.
55 | void setFrame(int frameIndex, float time, float value);
56 |
57 | protected:
58 | static const int PREV_TIME;
59 | static const int PREV_VALUE;
60 | static const int VALUE;
61 |
62 | Vector _frames;
63 | int _pathConstraintIndex;
64 | };
65 | }
66 |
67 | #endif /* Spine_PathConstraintPositionTimeline_h */
68 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PathConstraintSpacingTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PathConstraintSpacingTimeline_h
31 | #define Spine_PathConstraintSpacingTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API PathConstraintSpacingTimeline : public PathConstraintPositionTimeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit PathConstraintSpacingTimeline(int frameCount);
44 |
45 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
46 |
47 | virtual int getPropertyId();
48 | };
49 | }
50 |
51 | #endif /* Spine_PathConstraintSpacingTimeline_h */
52 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PointAttachment.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PointAttachment_h
31 | #define Spine_PointAttachment_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class Bone;
37 |
38 | /// An attachment which is a single point and a rotation. This can be used to spawn projectiles, particles, etc. A bone can be
39 | /// used in similar ways, but a PointAttachment is slightly less expensive to compute and can be hidden, shown, and placed in a
40 | /// skin.
41 | ///
42 | /// See http://esotericsoftware.com/spine-point-attachments for Point Attachments in the Spine User Guide.
43 | ///
44 | class SP_API PointAttachment : public Attachment {
45 | friend class SkeletonBinary;
46 | friend class SkeletonJson;
47 |
48 | RTTI_DECL
49 |
50 | public:
51 | explicit PointAttachment(const String& name);
52 |
53 | void computeWorldPosition(Bone& bone, float& ox, float& oy);
54 |
55 | float computeWorldRotation(Bone& bone);
56 |
57 | float getX();
58 | void setX(float inValue);
59 |
60 | float getY();
61 | void setY(float inValue);
62 |
63 | float getRotation();
64 | void setRotation(float inValue);
65 |
66 | virtual Attachment* copy();
67 |
68 | private:
69 | float _x, _y, _rotation;
70 | };
71 | }
72 |
73 | #endif /* Spine_PointAttachment_h */
74 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Pool.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Pool_h
31 | #define Spine_Pool_h
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 |
38 | namespace spine {
39 | template
40 | class SP_API Pool : public SpineObject {
41 | public:
42 | Pool() {
43 | }
44 |
45 | ~Pool() {
46 | ContainerUtil::cleanUpVectorOfPointers(_objects);
47 | }
48 |
49 | T *obtain() {
50 | if (_objects.size() > 0) {
51 | T **object = &_objects[_objects.size() - 1];
52 | T *ret = *object;
53 | _objects.removeAt(_objects.size() - 1);
54 |
55 | return ret;
56 | } else {
57 | T *ret = new(__FILE__, __LINE__) T();
58 |
59 | return ret;
60 | }
61 | }
62 |
63 | void free(T *object) {
64 | if (!_objects.contains(object)) {
65 | _objects.add(object);
66 | }
67 | }
68 |
69 | private:
70 | Vector _objects;
71 | };
72 | }
73 |
74 | #endif /* Spine_Pool_h */
75 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/PositionMode.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_PositionMode_h
31 | #define Spine_PositionMode_h
32 |
33 | namespace spine {
34 | enum PositionMode {
35 | PositionMode_Fixed = 0,
36 | PositionMode_Percent
37 | };
38 | }
39 |
40 | #endif /* Spine_PositionMode_h */
41 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/RTTI.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_RTTI_h
31 | #define Spine_RTTI_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API RTTI : public SpineObject {
37 | public:
38 | explicit RTTI(const char *className);
39 |
40 | RTTI(const char *className, const RTTI &baseRTTI);
41 |
42 | const char *getClassName() const;
43 |
44 | bool isExactly(const RTTI &rtti) const;
45 |
46 | bool instanceOf(const RTTI &rtti) const;
47 |
48 | private:
49 | // Prevent copying
50 | RTTI(const RTTI &obj);
51 |
52 | RTTI &operator=(const RTTI &obj);
53 |
54 | const char* _className;
55 | const RTTI *_pBaseRTTI;
56 | };
57 | }
58 |
59 | #define RTTI_DECL \
60 | public: \
61 | static const spine::RTTI rtti; \
62 | virtual const spine::RTTI& getRTTI() const;
63 |
64 | #define RTTI_IMPL_NOPARENT(name) \
65 | const spine::RTTI name::rtti(#name); \
66 | const spine::RTTI& name::getRTTI() const { return rtti; }
67 |
68 | #define RTTI_IMPL(name, parent) \
69 | const spine::RTTI name::rtti(#name, parent::rtti); \
70 | const spine::RTTI& name::getRTTI() const { return rtti; }
71 |
72 | #endif /* Spine_RTTI_h */
73 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/RotateMode.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_RotateMode_h
31 | #define Spine_RotateMode_h
32 |
33 | namespace spine {
34 | enum RotateMode {
35 | RotateMode_Tangent = 0,
36 | RotateMode_Chain,
37 | RotateMode_ChainScale
38 | };
39 | }
40 |
41 | #endif /* Spine_RotateMode_h */
42 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/RotateTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_RotateTimeline_h
31 | #define Spine_RotateTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API RotateTimeline : public CurveTimeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 | friend class AnimationState;
40 |
41 | RTTI_DECL
42 |
43 | public:
44 | static const int ENTRIES = 2;
45 |
46 | explicit RotateTimeline(int frameCount);
47 |
48 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
49 |
50 | virtual int getPropertyId();
51 |
52 | /// Sets the time and value of the specified keyframe.
53 | void setFrame(int frameIndex, float time, float degrees);
54 |
55 | int getBoneIndex();
56 | void setBoneIndex(int inValue);
57 |
58 | Vector& getFrames();
59 |
60 | private:
61 | static const int PREV_TIME = -2;
62 | static const int PREV_ROTATION = -1;
63 | static const int ROTATION = 1;
64 |
65 | int _boneIndex;
66 | Vector _frames; // time, angle, ...
67 | };
68 | }
69 |
70 | #endif /* Spine_RotateTimeline_h */
71 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/ScaleTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_ScaleTimeline_h
31 | #define Spine_ScaleTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API ScaleTimeline : public TranslateTimeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit ScaleTimeline(int frameCount);
44 |
45 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
46 |
47 | virtual int getPropertyId();
48 | };
49 | }
50 |
51 | #endif /* Spine_ScaleTimeline_h */
52 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/ShearTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_ShearTimeline_h
31 | #define Spine_ShearTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API ShearTimeline : public TranslateTimeline {
37 | friend class SkeletonBinary;
38 | friend class SkeletonJson;
39 |
40 | RTTI_DECL
41 |
42 | public:
43 | explicit ShearTimeline(int frameCount);
44 |
45 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
46 |
47 | virtual int getPropertyId();
48 | };
49 | }
50 |
51 | #endif /* Spine_ShearTimeline_h */
52 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/SpacingMode.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_SpacingMode_h
31 | #define Spine_SpacingMode_h
32 |
33 | namespace spine {
34 | enum SpacingMode {
35 | SpacingMode_Length = 0,
36 | SpacingMode_Fixed,
37 | SpacingMode_Percent
38 | };
39 | }
40 |
41 | #endif /* Spine_SpacingMode_h */
42 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/SpineObject.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Object_h
31 | #define Spine_Object_h
32 |
33 | #include
34 | #include
35 |
36 | #include
37 |
38 | namespace spine {
39 | class String;
40 |
41 | class SP_API SpineObject {
42 | public:
43 | void *operator new(size_t sz);
44 |
45 | void *operator new(size_t sz, const char *file, int line);
46 |
47 | void *operator new(size_t sz, void *ptr);
48 |
49 | void operator delete(void *p, const char *file, int line);
50 |
51 | void operator delete(void *p, void *mem);
52 |
53 | void operator delete(void *p);
54 |
55 | virtual ~SpineObject();
56 | };
57 | }
58 |
59 | #endif
60 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TextureLoader.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TextureLoader_h
31 | #define Spine_TextureLoader_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | class AtlasPage;
38 |
39 | class SP_API TextureLoader : public SpineObject {
40 | public:
41 | TextureLoader();
42 |
43 | virtual ~TextureLoader();
44 |
45 | virtual void load(AtlasPage& page, const String& path) = 0;
46 |
47 | virtual void unload(void* texture) = 0;
48 | };
49 | }
50 |
51 | #endif /* Spine_TextureLoader_h */
52 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TimelineType.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TimelineType_h
31 | #define Spine_TimelineType_h
32 |
33 | namespace spine {
34 | enum TimelineType {
35 | TimelineType_Rotate = 0,
36 | TimelineType_Translate,
37 | TimelineType_Scale,
38 | TimelineType_Shear,
39 | TimelineType_Attachment,
40 | TimelineType_Color,
41 | TimelineType_Deform,
42 | TimelineType_Event,
43 | TimelineType_DrawOrder,
44 | TimelineType_IkConstraint,
45 | TimelineType_TransformConstraint,
46 | TimelineType_PathConstraintPosition,
47 | TimelineType_PathConstraintSpacing,
48 | TimelineType_PathConstraintMix,
49 | TimelineType_TwoColor
50 | };
51 | }
52 |
53 | #endif /* Spine_TimelineType_h */
54 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TransformConstraintData.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TransformConstraintData_h
31 | #define Spine_TransformConstraintData_h
32 |
33 | #include
34 | #include
35 | #include
36 | #include
37 |
38 | namespace spine {
39 | class BoneData;
40 |
41 | class SP_API TransformConstraintData : public ConstraintData {
42 | friend class SkeletonBinary;
43 | friend class SkeletonJson;
44 |
45 | friend class TransformConstraint;
46 | friend class Skeleton;
47 | friend class TransformConstraintTimeline;
48 |
49 | public:
50 | explicit TransformConstraintData(const String& name);
51 |
52 | Vector& getBones();
53 | BoneData* getTarget();
54 | float getRotateMix();
55 | float getTranslateMix();
56 | float getScaleMix();
57 | float getShearMix();
58 |
59 | float getOffsetRotation();
60 | float getOffsetX();
61 | float getOffsetY();
62 | float getOffsetScaleX();
63 | float getOffsetScaleY();
64 | float getOffsetShearY();
65 |
66 | bool isRelative();
67 | bool isLocal();
68 |
69 | private:
70 | Vector _bones;
71 | BoneData* _target;
72 | float _rotateMix, _translateMix, _scaleMix, _shearMix;
73 | float _offsetRotation, _offsetX, _offsetY, _offsetScaleX, _offsetScaleY, _offsetShearY;
74 | bool _relative, _local;
75 | };
76 | }
77 |
78 | #endif /* Spine_TransformConstraintData_h */
79 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TransformConstraintTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TransformConstraintTimeline_h
31 | #define Spine_TransformConstraintTimeline_h
32 |
33 | #include
34 |
35 | namespace spine {
36 |
37 | class SP_API TransformConstraintTimeline : public CurveTimeline {
38 | friend class SkeletonBinary;
39 | friend class SkeletonJson;
40 |
41 | RTTI_DECL
42 |
43 | public:
44 | static const int ENTRIES;
45 |
46 | explicit TransformConstraintTimeline(int frameCount);
47 |
48 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
49 |
50 | virtual int getPropertyId();
51 |
52 | void setFrame(size_t frameIndex, float time, float rotateMix, float translateMix, float scaleMix, float shearMix);
53 |
54 | private:
55 | static const int PREV_TIME;
56 | static const int PREV_ROTATE;
57 | static const int PREV_TRANSLATE;
58 | static const int PREV_SCALE;
59 | static const int PREV_SHEAR;
60 | static const int ROTATE;
61 | static const int TRANSLATE;
62 | static const int SCALE;
63 | static const int SHEAR;
64 |
65 | Vector _frames;
66 | int _transformConstraintIndex;
67 | };
68 | }
69 |
70 | #endif /* Spine_TransformConstraintTimeline_h */
71 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TransformMode.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TransformMode_h
31 | #define Spine_TransformMode_h
32 |
33 | namespace spine {
34 | enum TransformMode {
35 | TransformMode_Normal = 0,
36 | TransformMode_OnlyTranslation,
37 | TransformMode_NoRotationOrReflection,
38 | TransformMode_NoScale,
39 | TransformMode_NoScaleOrReflection
40 | };
41 | }
42 |
43 | #endif /* Spine_TransformMode_h */
44 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/TranslateTimeline.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_TranslateTimeline_h
31 | #define Spine_TranslateTimeline_h
32 |
33 | #include
34 |
35 | #include
36 | #include
37 |
38 | namespace spine {
39 |
40 | class SP_API TranslateTimeline : public CurveTimeline {
41 | friend class SkeletonBinary;
42 | friend class SkeletonJson;
43 |
44 | RTTI_DECL
45 |
46 | public:
47 | static const int ENTRIES;
48 |
49 | explicit TranslateTimeline(int frameCount);
50 |
51 | virtual ~TranslateTimeline();
52 |
53 | virtual void apply(Skeleton& skeleton, float lastTime, float time, Vector* pEvents, float alpha, MixBlend blend, MixDirection direction);
54 |
55 | virtual int getPropertyId();
56 |
57 | /// Sets the time and value of the specified keyframe.
58 | void setFrame(int frameIndex, float time, float x, float y);
59 |
60 | protected:
61 | static const int PREV_TIME;
62 | static const int PREV_X;
63 | static const int PREV_Y;
64 | static const int X;
65 | static const int Y;
66 |
67 | Vector _frames;
68 | int _boneIndex;
69 | };
70 | }
71 |
72 | #endif /* Spine_TranslateTimeline_h */
73 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Triangulator.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Triangulator_h
31 | #define Spine_Triangulator_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | class SP_API Triangulator : public SpineObject {
38 | public:
39 | ~Triangulator();
40 |
41 | Vector &triangulate(Vector &vertices);
42 |
43 | Vector< Vector* > &decompose(Vector &vertices, Vector &triangles);
44 |
45 | private:
46 | Vector* > _convexPolygons;
47 | Vector* > _convexPolygonsIndices;
48 |
49 | Vector _indices;
50 | Vector _isConcaveArray;
51 | Vector _triangles;
52 |
53 | Pool > _polygonPool;
54 | Pool > _polygonIndicesPool;
55 |
56 | static bool isConcave(int index, int vertexCount, Vector &vertices, Vector &indices);
57 |
58 | static bool positiveArea(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y);
59 |
60 | static int winding(float p1x, float p1y, float p2x, float p2y, float p3x, float p3y);
61 | };
62 | }
63 |
64 | #endif /* Spine_Triangulator_h */
65 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Updatable.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Updatable_h
31 | #define Spine_Updatable_h
32 |
33 | #include
34 | #include
35 |
36 | namespace spine {
37 | class SP_API Updatable : public SpineObject {
38 | RTTI_DECL
39 |
40 | public:
41 | Updatable();
42 |
43 | virtual ~Updatable();
44 |
45 | virtual void update() = 0;
46 |
47 | virtual bool isActive() = 0;
48 |
49 | virtual void setActive(bool inValue) = 0;
50 | };
51 | }
52 |
53 | #endif /* Spine_Updatable_h */
54 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/Vertices.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef Spine_Vertices_h
31 | #define Spine_Vertices_h
32 |
33 | #include
34 |
35 | namespace spine {
36 | class SP_API Vertices : public SpineObject {
37 | public:
38 | Vector _bones;
39 | Vector _vertices;
40 | };
41 | }
42 |
43 | #endif /* Spine_Vertices_h */
44 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/include/spine/dll.h:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifndef SPINE_SHAREDLIB_H
31 | #define SPINE_SHAREDLIB_H
32 |
33 | #ifdef _WIN32
34 | #define DLLIMPORT __declspec(dllimport)
35 | #define DLLEXPORT __declspec(dllexport)
36 | #else
37 | #ifndef DLLIMPORT
38 | #define DLLIMPORT
39 | #endif
40 | #ifndef DLLEXPORT
41 | #define DLLEXPORT
42 | #endif
43 | #endif
44 |
45 | #ifdef SPINEPLUGIN_API
46 | #define SP_API SPINEPLUGIN_API
47 | #else
48 | #define SP_API
49 | #endif
50 |
51 | #endif /* SPINE_SHAREDLIB_H */
52 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/Attachment.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 |
38 | using namespace spine;
39 |
40 | RTTI_IMPL_NOPARENT(Attachment)
41 |
42 | Attachment::Attachment(const String &name) : _name(name), _refCount(0) {
43 | assert(_name.length() > 0);
44 | }
45 |
46 | Attachment::~Attachment() {
47 | }
48 |
49 | const String &Attachment::getName() const {
50 | return _name;
51 | }
52 |
53 | int Attachment::getRefCount() {
54 | return _refCount;
55 | }
56 |
57 | void Attachment::reference() {
58 | _refCount++;
59 | }
60 |
61 | void Attachment::dereference() {
62 | _refCount--;
63 | }
64 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/AttachmentLoader.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 | #include
38 | #include
39 | #include
40 | #include
41 | #include
42 | #include
43 |
44 | using namespace spine;
45 |
46 | RTTI_IMPL_NOPARENT(AttachmentLoader)
47 |
48 | AttachmentLoader::AttachmentLoader() {
49 | }
50 |
51 | AttachmentLoader::~AttachmentLoader() {
52 | }
53 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/BoundingBoxAttachment.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | using namespace spine;
37 |
38 | RTTI_IMPL(BoundingBoxAttachment, VertexAttachment)
39 |
40 | BoundingBoxAttachment::BoundingBoxAttachment(const String &name) : VertexAttachment(name) {
41 | }
42 |
43 | Attachment* BoundingBoxAttachment::copy() {
44 | BoundingBoxAttachment* copy = new (__FILE__, __LINE__) BoundingBoxAttachment(getName());
45 | copyTo(copy);
46 | return copy;
47 | }
48 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/ClippingAttachment.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 |
38 | using namespace spine;
39 |
40 | RTTI_IMPL(ClippingAttachment, VertexAttachment)
41 |
42 | ClippingAttachment::ClippingAttachment(const String &name) : VertexAttachment(name), _endSlot(NULL) {
43 | }
44 |
45 | SlotData *ClippingAttachment::getEndSlot() {
46 | return _endSlot;
47 | }
48 |
49 | void ClippingAttachment::setEndSlot(SlotData *inValue) {
50 | _endSlot = inValue;
51 | }
52 |
53 | Attachment* ClippingAttachment::copy() {
54 | ClippingAttachment* copy = new (__FILE__, __LINE__) ClippingAttachment(getName());
55 | copyTo(copy);
56 | copy->_endSlot = _endSlot;
57 | return copy;
58 | }
59 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/ConstraintData.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | using namespace spine;
37 |
38 | ConstraintData::ConstraintData(const String& name): _name(name), _order(0), _skinRequired(false) {
39 | }
40 |
41 | ConstraintData::~ConstraintData() {
42 | }
43 |
44 | const String& ConstraintData::getName() {
45 | return _name;
46 | }
47 |
48 | size_t ConstraintData::getOrder() {
49 | return _order;
50 | }
51 |
52 | void ConstraintData::setOrder(size_t inValue) {
53 | _order = inValue;
54 | }
55 |
56 | bool ConstraintData::isSkinRequired() {
57 | return _skinRequired;
58 | }
59 |
60 | void ConstraintData::setSkinRequired(bool inValue) {
61 | _skinRequired = inValue;
62 | }
63 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/Event.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 |
38 | spine::Event::Event(float time, const spine::EventData &data) :
39 | _data(data),
40 | _time(time),
41 | _intValue(0),
42 | _floatValue(0),
43 | _stringValue(),
44 | _volume(1),
45 | _balance(0) {
46 | }
47 |
48 | const spine::EventData &spine::Event::getData() {
49 | return _data;
50 | }
51 |
52 | float spine::Event::getTime() {
53 | return _time;
54 | }
55 |
56 | int spine::Event::getIntValue() {
57 | return _intValue;
58 | }
59 |
60 | void spine::Event::setIntValue(int inValue) {
61 | _intValue = inValue;
62 | }
63 |
64 | float spine::Event::getFloatValue() {
65 | return _floatValue;
66 | }
67 |
68 | void spine::Event::setFloatValue(float inValue) {
69 | _floatValue = inValue;
70 | }
71 |
72 | const spine::String &spine::Event::getStringValue() {
73 | return _stringValue;
74 | }
75 |
76 | void spine::Event::setStringValue(const spine::String &inValue) {
77 | _stringValue = inValue;
78 | }
79 |
80 |
81 | float spine::Event::getVolume() {
82 | return _volume;
83 | }
84 |
85 | void spine::Event::setVolume(float inValue) {
86 | _volume = inValue;
87 | }
88 |
89 | float spine::Event::getBalance() {
90 | return _balance;
91 | }
92 |
93 | void spine::Event::setBalance(float inValue) {
94 | _balance = inValue;
95 | }
96 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/LinkedMesh.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 |
38 | using namespace spine;
39 |
40 | LinkedMesh::LinkedMesh(MeshAttachment *mesh, const String &skin, size_t slotIndex, const String &parent, bool inheritDeform) :
41 | _mesh(mesh),
42 | _skin(skin),
43 | _slotIndex(slotIndex),
44 | _parent(parent),
45 | _inheritDeform(inheritDeform) {
46 | }
47 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/PathAttachment.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | using namespace spine;
37 |
38 | RTTI_IMPL(PathAttachment, VertexAttachment)
39 |
40 | PathAttachment::PathAttachment(const String &name) : VertexAttachment(name), _closed(false), _constantSpeed(false) {
41 | }
42 |
43 | Vector &PathAttachment::getLengths() {
44 | return _lengths;
45 | }
46 |
47 | bool PathAttachment::isClosed() {
48 | return _closed;
49 | }
50 |
51 | void PathAttachment::setClosed(bool inValue) {
52 | _closed = inValue;
53 | }
54 |
55 | bool PathAttachment::isConstantSpeed() {
56 | return _constantSpeed;
57 | }
58 |
59 | void PathAttachment::setConstantSpeed(bool inValue) {
60 | _constantSpeed = inValue;
61 | }
62 |
63 | Attachment* PathAttachment::copy() {
64 | PathAttachment* copy = new (__FILE__, __LINE__) PathAttachment(getName());
65 | copyTo(copy);
66 | copy->_lengths.clearAndAddAll(_lengths);
67 | copy->_closed = _closed;
68 | copy->_constantSpeed = _constantSpeed;
69 | return copy;
70 | }
71 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/RTTI.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 | #include
36 |
37 | using namespace spine;
38 |
39 | RTTI::RTTI(const char *className) : _className(className), _pBaseRTTI(NULL) {
40 | }
41 |
42 | RTTI::RTTI(const char *className, const RTTI &baseRTTI) : _className(className), _pBaseRTTI(&baseRTTI) {
43 | }
44 |
45 | const char *RTTI::getClassName() const {
46 | return _className;
47 | }
48 |
49 | bool RTTI::isExactly(const RTTI &rtti) const {
50 | return !strcmp(this->_className, rtti._className);
51 | }
52 |
53 | bool RTTI::instanceOf(const RTTI &rtti) const {
54 | const RTTI *pCompare = this;
55 | while (pCompare) {
56 | if (!strcmp(pCompare->_className, rtti._className)) return true;
57 | pCompare = pCompare->_pBaseRTTI;
58 | }
59 | return false;
60 | }
61 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/SlotData.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 |
38 | using namespace spine;
39 |
40 | SlotData::SlotData(int index, const String &name, BoneData &boneData) :
41 | _index(index),
42 | _name(name),
43 | _boneData(boneData),
44 | _color(1, 1, 1, 1),
45 | _darkColor(0, 0, 0, 0),
46 | _hasDarkColor(false),
47 | _attachmentName(),
48 | _blendMode(BlendMode_Normal) {
49 | assert(_index >= 0);
50 | assert(_name.length() > 0);
51 | }
52 |
53 | int SlotData::getIndex() {
54 | return _index;
55 | }
56 |
57 | const String &SlotData::getName() {
58 | return _name;
59 | }
60 |
61 | BoneData &SlotData::getBoneData() {
62 | return _boneData;
63 | }
64 |
65 | Color &SlotData::getColor() {
66 | return _color;
67 | }
68 |
69 | Color &SlotData::getDarkColor() {
70 | return _darkColor;
71 | }
72 |
73 | bool SlotData::hasDarkColor() {
74 | return _hasDarkColor;
75 | }
76 |
77 | void SlotData::setHasDarkColor(bool inValue) {
78 | _hasDarkColor = inValue;
79 | }
80 |
81 | const String &SlotData::getAttachmentName() {
82 | return _attachmentName;
83 | }
84 |
85 | void SlotData::setAttachmentName(const String &inValue) {
86 | _attachmentName = inValue;
87 | }
88 |
89 | BlendMode SlotData::getBlendMode() {
90 | return _blendMode;
91 | }
92 |
93 | void SlotData::setBlendMode(BlendMode inValue) {
94 | _blendMode = inValue;
95 | }
96 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/SpineObject.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 | #include
36 |
37 | using namespace spine;
38 |
39 | void *SpineObject::operator new(size_t sz) {
40 | return SpineExtension::getInstance()->_calloc(sz, __FILE__, __LINE__);
41 | }
42 |
43 | void *SpineObject::operator new(size_t sz, const char *file, int line) {
44 | return SpineExtension::getInstance()->_calloc(sz, file, line);
45 | }
46 |
47 | void *SpineObject::operator new(size_t sz, void *ptr) {
48 | SP_UNUSED(sz);
49 | return ptr;
50 | }
51 |
52 | void SpineObject::operator delete(void *p, const char *file, int line) {
53 | SpineExtension::free(p, file, line);
54 | }
55 |
56 | void SpineObject::operator delete(void *p, void *mem) {
57 | SP_UNUSED(mem);
58 | SpineExtension::free(p, __FILE__, __LINE__);
59 | }
60 |
61 | void SpineObject::operator delete(void *p) {
62 | SpineExtension::free(p, __FILE__, __LINE__);
63 | }
64 |
65 | SpineObject::~SpineObject() {
66 | }
67 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/TextureLoader.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | namespace spine {
37 | TextureLoader::TextureLoader() {
38 | }
39 |
40 | TextureLoader::~TextureLoader() {
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/Timeline.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | #include
37 | #include
38 |
39 | namespace spine {
40 | RTTI_IMPL_NOPARENT(Timeline)
41 |
42 | Timeline::Timeline() {
43 | }
44 |
45 | Timeline::~Timeline() {
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/spine-cpp/spine-cpp/src/spine/Updatable.cpp:
--------------------------------------------------------------------------------
1 | /******************************************************************************
2 | * Spine Runtimes License Agreement
3 | * Last updated January 1, 2020. Replaces all prior versions.
4 | *
5 | * Copyright (c) 2013-2020, Esoteric Software LLC
6 | *
7 | * Integration of the Spine Runtimes into software or otherwise creating
8 | * derivative works of the Spine Runtimes is permitted under the terms and
9 | * conditions of Section 2 of the Spine Editor License Agreement:
10 | * http://esotericsoftware.com/spine-editor-license
11 | *
12 | * Otherwise, it is permitted to integrate the Spine Runtimes into software
13 | * or otherwise create derivative works of the Spine Runtimes (collectively,
14 | * "Products"), provided that each user of the Products must obtain their own
15 | * Spine Editor license and redistribution of the Products in any form must
16 | * include this license and copyright notice.
17 | *
18 | * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
19 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 | * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
22 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
24 | * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
25 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 | * THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 | *****************************************************************************/
29 |
30 | #ifdef SPINE_UE4
31 | #include "SpinePluginPrivatePCH.h"
32 | #endif
33 |
34 | #include
35 |
36 | using namespace spine;
37 |
38 | RTTI_IMPL_NOPARENT(Updatable)
39 |
40 | Updatable::Updatable() {
41 | }
42 |
43 | Updatable::~Updatable() {
44 | }
45 |
--------------------------------------------------------------------------------
/test/boy/spineboy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/keith2018/spine-opengl/4e9c89a143e4c874ab0dff02ab941da9b9f40be0/test/boy/spineboy.png
--------------------------------------------------------------------------------