diff --git a/spine-cpp/.cproject b/spine-cpp/.cproject
index de0550c4d..18bb913d7 100644
--- a/spine-cpp/.cproject
+++ b/spine-cpp/.cproject
@@ -37,6 +37,9 @@
+
+
+
diff --git a/spine-cpp/.settings/org.eclipse.cdt.codan.core.prefs b/spine-cpp/.settings/org.eclipse.cdt.codan.core.prefs
index 4fa6ad5b7..aea1e4706 100644
--- a/spine-cpp/.settings/org.eclipse.cdt.codan.core.prefs
+++ b/spine-cpp/.settings/org.eclipse.cdt.codan.core.prefs
@@ -19,8 +19,8 @@ org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
-org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=-Warning
-org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
+org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={fileScope\=>inclusion\=>(),exclusion\=>("json/*"),launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},skip\=>true}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true}}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
diff --git a/spine-cpp/include/spine/Animation.h b/spine-cpp/include/spine/Animation.h
index 6dc699670..2c3f71444 100644
--- a/spine-cpp/include/spine/Animation.h
+++ b/spine-cpp/include/spine/Animation.h
@@ -42,7 +42,7 @@ public:
Animation (const std::vector &timelines, float duration);
~Animation ();
- void apply (BaseSkeleton *skeleton, float time, bool loop) const;
+ void apply (BaseSkeleton *skeleton, float time, bool loop = false) const;
void mix (BaseSkeleton *skeleton, float time, bool loop, float alpha) const;
};
@@ -57,7 +57,7 @@ public:
virtual int getKeyframeCount () const = 0;
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const = 0;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const = 0;
};
//
@@ -94,7 +94,7 @@ public:
virtual float getDuration () const;
virtual int getKeyframeCount () const;
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const;
void setKeyframe (int keyframeIndex, float time, float value);
};
@@ -112,7 +112,7 @@ public:
virtual float getDuration () const;
virtual int getKeyframeCount () const;
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const;
void setKeyframe (int keyframeIndex, float time, float x, float y);
};
@@ -123,7 +123,7 @@ class ScaleTimeline: public TranslateTimeline {
public:
ScaleTimeline (int keyframeCount);
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const;
};
//
@@ -139,7 +139,7 @@ public:
virtual float getDuration () const;
virtual int getKeyframeCount () const;
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const;
void setKeyframe (int keyframeIndex, float time, float r, float g, float b, float a);
};
@@ -158,7 +158,7 @@ public:
virtual float getDuration () const;
virtual int getKeyframeCount () const;
- virtual void apply (BaseSkeleton *skeleton, float time, float alpha) const;
+ virtual void apply (BaseSkeleton *skeleton, float time, float alpha = 1) const;
/** The AttachmentTimeline owns the attachmentName.
* @param attachmentName May be null to clear the image for a slot. */
diff --git a/spine-cpp/include/spine/AnimationState.h b/spine-cpp/include/spine/AnimationState.h
new file mode 100644
index 000000000..eb61a10f2
--- /dev/null
+++ b/spine-cpp/include/spine/AnimationState.h
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2013, Esoteric Software
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ******************************************************************************/
+
+#ifndef SPINE_ANIMATIONSTATE_H_
+#define SPINE_ANIMATIONSTATE_H_
+
+#include