spine-c Eclipse project builds lib instead of exe, spine-sfml uses static libs.

This commit is contained in:
NathanSweet 2014-05-12 22:57:30 +02:00
parent 36809166a2
commit f869e93546
6 changed files with 56 additions and 95 deletions

View File

@ -7,17 +7,25 @@
<extensions>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.784427509" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
<configuration artifactExtension="a" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.staticLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.staticLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.mingw.exe.debug.784427509" name="Debug" parent="cdt.managedbuild.config.gnu.mingw.exe.debug">
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.784427509." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1244859277" name="MinGW GCC" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.2141344127" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/spine-ctest/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.2012621380" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<builder buildPath="${workspace_loc:/spine-ctest/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.2012621380" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.1379375071" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
<option id="gnu.both.asm.option.include.paths.1680140054" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1840963518" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1581759609" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
@ -25,8 +33,8 @@
<option id="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level.541156248" name="Optimization Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
<option id="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level.393447411" name="Debug Level" superClass="gnu.cpp.compiler.mingw.exe.debug.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
<option id="gnu.cpp.compiler.option.include.paths.1471448443" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.564303729" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
@ -34,8 +42,8 @@
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.mingw.exe.debug.option.optimization.level.71579608" 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.2068803714" 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.2051361089" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
</option>
<option id="gnu.c.compiler.option.misc.other.1829716988" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 -std=c89" valueType="string"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.603555848" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
@ -51,7 +59,6 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="example"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>

View File

@ -7,7 +7,5 @@ environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/C_INCLUDE_PATH/operation=remove
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/append=true
environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/appendContributed=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/LIBRARY_PATH/delimiter=;
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/LIBRARY_PATH/operation=remove
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/append=true
environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.784427509/appendContributed=true

View File

@ -1,55 +0,0 @@
/* This demonstrates implementing an extension to spine-c. spine/extension.h declares the functions that must be implemented along
* with internal methods exposed to facilitate extension. */
#include <stdio.h>
#include <spine/spine.h>
#include <spine/extension.h>
/**/
void _spAtlasPage_createTexture (spAtlasPage* self, const char* path) {
self->rendererObject = 0;
self->width = 123;
self->height = 456;
}
void _spAtlasPage_disposeTexture (spAtlasPage* self) {
}
char* _spUtil_readFile (const char* path, int* length) {
return _readFile(path, length);
}
/**/
int main (void) {
spAtlas* atlas = spAtlas_createFromFile("data/spineboy.atlas", 0);
printf("First region name: %s, x: %d, y: %d\n", atlas->regions->name, atlas->regions->x, atlas->regions->y);
printf("First page name: %s, size: %d, %d\n", atlas->pages->name, atlas->pages->width, atlas->pages->height);
spSkeletonJson* json = spSkeletonJson_create(atlas);
spSkeletonData *skeletonData = spSkeletonJson_readSkeletonDataFile(json, "data/spineboy.json");
if (!skeletonData) {
printf("Error: %s\n", json->error);
exit(0);
}
printf("Default skin name: %s\n", skeletonData->defaultSkin->name);
spSkeleton* skeleton = spSkeleton_create(skeletonData);
spAnimation* animation = spSkeletonData_findAnimation(skeletonData, "walk");
if (!animation) {
printf("Error: Animation not found: walk\n");
exit(0);
}
printf("Animation timelineCount: %d\n", animation->timelineCount);
spSkeleton_dispose(skeleton);
spSkeletonData_dispose(skeletonData);
spSkeletonJson_dispose(json);
spAtlas_dispose(atlas);
return 0;
}

View File

@ -3,9 +3,7 @@
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.debug.804921154">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.debug.804921154" moduleId="org.eclipse.cdt.core.settings" name="Debug">
<externalSettings>
<externalSetting/>
</externalSettings>
<externalSettings/>
<extensions>
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
@ -18,9 +16,19 @@
<folderInfo id="cdt.managedbuild.config.gnu.mingw.exe.debug.804921154." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.mingw.exe.debug.1440800193" name="MinGW GCC" resourceTypeBasedDiscovery="true" superClass="cdt.managedbuild.toolchain.gnu.mingw.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.mingw.exe.debug.797088945" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.mingw.exe.debug"/>
<builder buildPath="${workspace_loc:/cpp-generic/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1296203303" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base"/>
<builder buildPath="${workspace_loc:/cpp-generic/Debug}" id="cdt.managedbuild.tool.gnu.builder.mingw.base.1296203303" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="cdt.managedbuild.tool.gnu.builder.mingw.base">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Debug"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name="Release"/>
</outputEntries>
</builder>
<tool id="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug.1487845826" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.mingw.exe.debug">
<option id="gnu.both.asm.option.include.paths.1112183959" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
<option id="gnu.both.asm.option.include.paths.1112183959" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/SFML/include}&quot;"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.339251819" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
</tool>
<tool id="cdt.managedbuild.tool.gnu.archiver.mingw.base.1265146112" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.mingw.base"/>
@ -31,31 +39,39 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/SFML/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/SFML/include}&quot;"/>
</option>
<option id="gnu.cpp.compiler.option.warnings.allwarn.2053349441" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="true" valueType="boolean"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1463772359" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def"/>
<option id="gnu.cpp.compiler.option.preprocessor.def.1463772359" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="SFML_STATIC"/>
</option>
<option id="gnu.cpp.compiler.option.dialect.std.322230174" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1445618618" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="gcc" 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">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/src}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/include}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/SFML/include}&quot;"/>
</option>
<option id="gnu.c.compiler.option.misc.other.20851089" name="Other flags" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0" valueType="string"/>
<option id="gnu.c.compiler.option.dialect.std.27152499" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
<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"/>
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug.1697744244" name="MinGW C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.mingw.exe.debug">
<option id="gnu.cpp.link.option.paths.1569606245" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/SFML/bin}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-sfml/SFML/bin}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/spine-c/Debug}&quot;"/>
</option>
<option id="gnu.cpp.link.option.libs.43946887" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
<listOptionValue builtIn="false" value="sfml-system-d-2"/>
<listOptionValue builtIn="false" value="sfml-window-d-2"/>
<listOptionValue builtIn="false" value="sfml-graphics-d-2"/>
<listOptionValue builtIn="false" value="spine-c"/>
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="sfml-system-2"/>
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="sfml-window-2"/>
<listOptionValue builtIn="false" srcPrefixMapping="" srcRootPath="" value="sfml-graphics-2"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.241907813" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
@ -65,13 +81,14 @@
</toolChain>
</folderInfo>
<sourceEntries>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="example"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="spine-c src"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="src"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="example"/>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
</sourceEntries>
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
<externalSettings containerId="spine-c;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier"/>
</storageModule>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.mingw.exe.release.165980790">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.mingw.exe.release.165980790" moduleId="org.eclipse.cdt.core.settings" name="Release">
@ -157,12 +174,12 @@
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1009813244;cdt.managedbuild.config.gnu.mingw.exe.release.1009813244.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.release.590673427;cdt.managedbuild.tool.gnu.c.compiler.input.802052137">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.98344941;cdt.managedbuild.config.gnu.mingw.exe.debug.98344941.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.155084450;cdt.managedbuild.tool.gnu.c.compiler.input.1081023111">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.release.1009813244;cdt.managedbuild.config.gnu.mingw.exe.release.1009813244.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.release.1680995989;cdt.managedbuild.tool.gnu.cpp.compiler.input.672167706">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.98344941;cdt.managedbuild.config.gnu.mingw.exe.debug.98344941.;cdt.managedbuild.tool.gnu.c.compiler.mingw.exe.debug.155084450;cdt.managedbuild.tool.gnu.c.compiler.input.1081023111">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
</scannerConfigBuildInfo>
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.mingw.exe.debug.804921154;cdt.managedbuild.config.gnu.mingw.exe.debug.804921154.;cdt.managedbuild.tool.gnu.cpp.compiler.mingw.exe.debug.1111247076;cdt.managedbuild.tool.gnu.cpp.compiler.input.1445618618">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>

View File

@ -3,6 +3,7 @@
<name>spine-sfml</name>
<comment></comment>
<projects>
<project>spine-c</project>
</projects>
<buildSpec>
<buildCommand>
@ -24,11 +25,4 @@
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
<linkedResources>
<link>
<name>spine-c src</name>
<type>2</type>
<locationURI>PARENT-1-PROJECT_LOC/spine-c/src</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -62,10 +62,10 @@ void callback (AnimationState* state, int trackIndex, EventType type, Event* eve
void spineboy () {
// Load atlas, skeleton, and animations.
Atlas* atlas = Atlas_createFromFile("../data/spineboy.atlas", 0);
Atlas* atlas = Atlas_createFromFile("data/spineboy.atlas", 0);
SkeletonJson* json = SkeletonJson_create(atlas);
json->scale = 0.6f;
SkeletonData *skeletonData = SkeletonJson_readSkeletonDataFile(json, "../data/spineboy.json");
SkeletonData *skeletonData = SkeletonJson_readSkeletonDataFile(json, "data/spineboy.json");
if (!skeletonData) {
printf("%s\n", json->error);
exit(0);
@ -136,10 +136,10 @@ void spineboy () {
void goblins () {
// Load atlas, skeleton, and animations.
Atlas* atlas = Atlas_createFromFile("../data/goblins-ffd.atlas", 0);
Atlas* atlas = Atlas_createFromFile("data/goblins-ffd.atlas", 0);
SkeletonJson* json = SkeletonJson_create(atlas);
json->scale = 1.4f;
SkeletonData *skeletonData = SkeletonJson_readSkeletonDataFile(json, "../data/goblins-ffd.json");
SkeletonData *skeletonData = SkeletonJson_readSkeletonDataFile(json, "data/goblins-ffd.json");
if (!skeletonData) {
printf("Error: %s\n", json->error);
exit(0);