Skip to content

Commit

Permalink
Some minor changes required for SDL2/Ignifuga integration
Browse files Browse the repository at this point in the history
  • Loading branch information
gabomdq committed May 16, 2013
1 parent 8d8de81 commit 5d2d8cb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spine-c/include/spine/Atlas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion spine-c/include/spine/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions spine-c/src/spine/Atlas.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion spine-c/src/spine/Json.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/* Json */
/* JSON parser in C. */

#include "Json.h"
#include <spine/Json.h>
#include <math.h>
#include <stdio.h>
#include <ctype.h>
Expand Down
2 changes: 1 addition & 1 deletion spine-c/src/spine/SkeletonJson.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include <math.h>
#include <stdio.h>
#include <math.h>
#include "Json.h"
#include <spine/Json.h>
#include <spine/extension.h>
#include <spine/RegionAttachment.h>
#include <spine/AtlasAttachmentLoader.h>
Expand Down

0 comments on commit 5d2d8cb

Please sign in to comment.