diff --git a/spine-c/include/spine/Atlas.h b/spine-c/include/spine/Atlas.h index f6c0133f50..c4d4eb8b1c 100644 --- a/spine-c/include/spine/Atlas.h +++ b/spine-c/include/spine/Atlas.h @@ -95,9 +95,9 @@ typedef struct { } Atlas; /* Image files referenced in the atlas file will be prefixed with dir. */ -Atlas* Atlas_readAtlas (const char* data, int length, const char* dir); +Atlas* Atlas_readAtlas (const char* data, int length, const char* dir, void *param); /* Image files referenced in the atlas file will be prefixed with the directory containing the atlas file. */ -Atlas* Atlas_readAtlasFile (const char* path); +Atlas* Atlas_readAtlasFile (const char* path, void *param); void Atlas_dispose (Atlas* atlas); /* Returns 0 if the region was not found. */ diff --git a/spine-c/include/spine/extension.h b/spine-c/include/spine/extension.h index c12a0a8f3d..6a5da50263 100644 --- a/spine-c/include/spine/extension.h +++ b/spine-c/include/spine/extension.h @@ -96,7 +96,7 @@ extern "C" { * Functions that must be implemented: */ -void _AtlasPage_createTexture (AtlasPage* self, const char* path); +void _AtlasPage_createTexture (AtlasPage* self, const char* path, void *param); void _AtlasPage_disposeTexture (AtlasPage* self); char* _Util_readFile (const char* path, int* length); diff --git a/spine-c/src/spine/Atlas.c b/spine-c/src/spine/Atlas.c index b2b29d4f86..d063869bb3 100644 --- a/spine-c/src/spine/Atlas.c +++ b/spine-c/src/spine/Atlas.c @@ -166,7 +166,7 @@ static const char* formatNames[] = {"Alpha", "Intensity", "LuminanceAlpha", "RGB static const char* textureFilterNames[] = {"Nearest", "Linear", "MipMap", "MipMapNearestNearest", "MipMapLinearNearest", "MipMapNearestLinear", "MipMapLinearLinear"}; -Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) { +Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir, void *param) { int count; const char* end = begin + length; int dirLength = strlen(dir); @@ -211,7 +211,7 @@ Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) { page->vWrap = *str.begin == 'x' ? ATLAS_CLAMPTOEDGE : (*str.begin == 'y' ? ATLAS_REPEAT : ATLAS_REPEAT); } - _AtlasPage_createTexture(page, path); + _AtlasPage_createTexture(page, path, param); FREE(path); } else { AtlasRegion *region = AtlasRegion_create(); @@ -280,7 +280,7 @@ Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) { return self; } -Atlas* Atlas_readAtlasFile (const char* path) { +Atlas* Atlas_readAtlasFile (const char* path, void *param) { int dirLength; char *dir; int length; @@ -299,7 +299,7 @@ Atlas* Atlas_readAtlasFile (const char* path) { dir[dirLength] = '\0'; data = _Util_readFile(path, &length); - if (data) atlas = Atlas_readAtlas(data, length, dir); + if (data) atlas = Atlas_readAtlas(data, length, dir, param); FREE(data); FREE(dir); diff --git a/spine-c/src/spine/Json.c b/spine-c/src/spine/Json.c index 91f4983415..b39b4693ca 100644 --- a/spine-c/src/spine/Json.c +++ b/spine-c/src/spine/Json.c @@ -23,7 +23,7 @@ /* Json */ /* JSON parser in C. */ -#include "Json.h" +#include #include #include #include diff --git a/spine-c/src/spine/SkeletonJson.c b/spine-c/src/spine/SkeletonJson.c index d980fbb627..7228c254f9 100644 --- a/spine-c/src/spine/SkeletonJson.c +++ b/spine-c/src/spine/SkeletonJson.c @@ -27,7 +27,7 @@ #include #include #include -#include "Json.h" +#include #include #include #include