This commit is contained in:
NathanSweet 2013-02-21 01:46:56 +01:00
parent 03a64be6ef
commit 6887e51457
10 changed files with 33 additions and 18 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ spine-libgdx/libs/gdx-backend-lwjgl-natives.jar
spine-libgdx/libs/gdx-backend-lwjgl.jar
spine-libgdx/libs/gdx-natives.jar
spine-libgdx/libs/gdx.jar
target

7
README Normal file
View File

@ -0,0 +1,7 @@
# Spine Runtimes
This project hosts the runtimes needed to use [Spine](http://esotericsoftware.com/) 2D skeletal animations with various game toolkits.
The code provided here is currently under development and is subject to change.
Documentation is being worked on and will be provided as soon as possible.

View File

@ -32,13 +32,13 @@
<listOptionValue builtIn="false" value="&quot;C:\Users\Nate\Desktop\SFML-2.0-rc\include&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.warnings.allwarn.2053349441" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1463772359" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1463772359" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1445618618" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.344670633" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug">
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.1455011160" name="Optimization Level" superClass="gnu.c.compiler.mingw.exe.debug.option.optimization.level" valueType="enumerated"/>
<option id="gnu.c.compiler.mingw.exe.debug.option.debugging.level.242859432" name="Debug Level" superClass="gnu.c.compiler.mingw.exe.debug.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.991681732" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"/>
<option id="gnu.c.compiler.option.include.paths.991681732" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.753970334" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug.913061526" name="MinGW C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.mingw.exe.debug"/>
@ -140,4 +140,16 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="moo" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>make</buildCommand>
<buildArguments/>
<buildTarget>moo</buildTarget>
<stopOnError>true</stopOnError>
<useDefaultCommand>true</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>

View File

@ -12,7 +12,7 @@ public:
Skeleton (SkeletonData *skeletonData);
void draw (sf::RenderTarget& target, sf::RenderStates states) const;
virtual void draw (sf::RenderTarget& target, sf::RenderStates states) const;
};
} /* namespace spine */

View File

@ -38,7 +38,7 @@ public:
float *curves; // dfx, dfy, ddfx, ddfy, dddfx, dddfy, ...
CurveTimeline (int keyframeCount);
~CurveTimeline ();
virtual ~CurveTimeline ();
void setLinear (int keyframeIndex);
@ -61,7 +61,7 @@ public:
int boneIndex;
RotateTimeline (int keyframeCount);
~RotateTimeline ();
virtual ~RotateTimeline ();
virtual float getDuration () = 0;
virtual int getKeyframeCount () = 0;
@ -79,7 +79,7 @@ public:
int boneIndex;
TranslateTimeline (int keyframeCount);
~TranslateTimeline ();
virtual ~TranslateTimeline ();
virtual float getDuration () = 0;
virtual int getKeyframeCount () = 0;
@ -108,7 +108,7 @@ public:
int slotIndex;
ColorTimeline (int keyframeCount);
~ColorTimeline ();
virtual ~ColorTimeline ();
virtual float getDuration () = 0;
virtual int getKeyframeCount () = 0;
@ -127,7 +127,7 @@ public:
int slotIndex;
AttachmentTimeline (int keyframeCount);
~AttachmentTimeline ();
virtual ~AttachmentTimeline ();
virtual float getDuration () = 0;
virtual int getKeyframeCount () = 0;

View File

@ -11,9 +11,6 @@ class BaseRegionAttachment: public Attachment {
public:
float offset[8];
BaseRegionAttachment ();
~BaseRegionAttachment ();
void updateOffset ();
virtual void updateWorldVertices (Bone *bone) = 0;

View File

@ -24,7 +24,7 @@ public:
bool flipX, flipY;
BaseSkeleton (SkeletonData *data);
~BaseSkeleton ();
virtual ~BaseSkeleton ();
void updateWorldTransform ();

View File

@ -14,6 +14,7 @@ public:
float scale;
BaseSkeletonJson (BaseAttachmentLoader *attachmentLoader);
virtual ~BaseSkeletonJson ();
SkeletonData* readSkeletonData (const char *begin, const char *end) const;
SkeletonData* readSkeletonData (const std::string &json) const;

View File

@ -3,12 +3,6 @@
namespace spine {
BaseRegionAttachment::BaseRegionAttachment () {
}
BaseRegionAttachment::~BaseRegionAttachment () {
}
void BaseRegionAttachment::updateOffset () {
float localX2 = width / 2;
float localY2 = height / 2;

View File

@ -20,6 +20,9 @@ BaseSkeletonJson::BaseSkeletonJson (BaseAttachmentLoader *attachmentLoader) :
scale(1) {
}
BaseSkeletonJson::~BaseSkeletonJson () {
}
float toColor (const string &value, int index) {
if (value.size() != 8) throw runtime_error("Error parsing color, length must be 8: " + value);
char *p;