#include <stdlib.h>#include <string.h>#include <math.h>#include <spine/Skeleton.h>#include <spine/RegionAttachment.h>#include <spine/BoundingBoxAttachment.h>#include <spine/Animation.h>#include <spine/Atlas.h>#include <spine/AttachmentLoader.h>Macros | |
| #define | MALLOC(TYPE, COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) |
| #define | CALLOC(TYPE, COUNT) ((TYPE*)_calloc(COUNT, sizeof(TYPE))) |
| #define | NEW(TYPE) CALLOC(TYPE,1) |
| #define | SUPER(VALUE) (&VALUE->super) |
| #define | SUPER_CAST(TYPE, VALUE) ((TYPE*)VALUE) |
| #define | SUB_CAST(TYPE, VALUE) ((TYPE*)VALUE) |
| #define | CONST_CAST(TYPE, VALUE) (*(TYPE*)&VALUE) |
| #define | VTABLE(TYPE, VALUE) ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable) |
| #define | FREE(VALUE) _free((void*)VALUE) |
| #define | MALLOC_STR(TO, FROM) strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) |
| #define | FMOD(A, B) (float)fmod(A, B) |
Functions | |
| void | (spAtlasPage *self, const char *path) |
| void | (spAtlasPage *self) |
| char * | (const char *path, int *length) |
| void * | (size_t size) |
| void * | (size_t num, size_t size) |
| void | (void *ptr) |
| void | (void *(*_malloc)(size_t size)) |
| void | (void(*_free)(void *ptr)) |
| char * | (const char *path, int *length) |
| void | (spAttachmentLoader *self, void(*dispose)(spAttachmentLoader *self), spAttachment *(*newAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name)) |
| void | (spAttachmentLoader *self) |
| void | (spAttachmentLoader *self, const char *error1, const char *error2) |
| var | ( var self, var error1, var error2) |
| local | ( local self, local error1, local error2) |
| void | (spAttachmentLoader *self, spAttachmentType type) |
| void | (spAttachment *self, const char *name, spAttachmentType type, void(*dispose)(spAttachment *self)) |
| void | (spAttachment *self) |
| void | (spTimeline *self, spTimelineType type, void(*dispose)(spTimeline *self), void(*apply)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventCount, float alpha)) |
| void | (spTimeline *self) |
| void | (spCurveTimeline *self, spTimelineType type, int frameCount, void(*dispose)(spTimeline *self), void(*apply)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventCount, float alpha)) |
| void | (spCurveTimeline *self) |
| #define CALLOC | ( | TYPE, | |
| COUNT | |||
| ) | ((TYPE*)_calloc(COUNT, sizeof(TYPE))) |
| var CALLOC | ( | var, | |
| var | |||
| ) | ((TYPE*)_calloc(COUNT, sizeof(TYPE))) |
| local CALLOC | ( | local, | |
| local | |||
| ) | ((TYPE*)_calloc(COUNT, sizeof(TYPE))) |
| #define CONST_CAST | ( | TYPE, | |
| VALUE | |||
| ) | (*(TYPE*)&VALUE) |
| var CONST_CAST | ( | var, | |
| var | |||
| ) | (*(TYPE*)&VALUE) |
| local CONST_CAST | ( | local, | |
| local | |||
| ) | (*(TYPE*)&VALUE) |
| #define FMOD | ( | A, | |
| B | |||
| ) | (float)fmod(A, B) |
| #define FREE | ( | VALUE) | _free((void*)VALUE) |
| #define MALLOC | ( | TYPE, | |
| COUNT | |||
| ) | ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) |
| var MALLOC | ( | var, | |
| var | |||
| ) | ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) |
| local MALLOC | ( | local, | |
| local | |||
| ) | ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) |
| #define MALLOC_STR | ( | TO, | |
| FROM | |||
| ) | strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) |
| var MALLOC_STR | ( | var, | |
| var | |||
| ) | strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) |
| local MALLOC_STR | ( | local, | |
| local | |||
| ) | strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) |
| #define NEW | ( | TYPE) | CALLOC(TYPE,1) |
| var NEW | ( | var) | CALLOC(TYPE,1) |
| local NEW | ( | local) | CALLOC(TYPE,1) |
| #define SUB_CAST | ( | TYPE, | |
| VALUE | |||
| ) | ((TYPE*)VALUE) |
| var SUB_CAST | ( | var, | |
| var | |||
| ) | ((TYPE*)VALUE) |
| local SUB_CAST | ( | local, | |
| local | |||
| ) | ((TYPE*)VALUE) |
| #define SUPER | ( | VALUE) | (&VALUE->super) |
| var SUPER | ( | var) | (&VALUE->super) |
| local SUPER | ( | local) | (&VALUE->super) |
| #define SUPER_CAST | ( | TYPE, | |
| VALUE | |||
| ) | ((TYPE*)VALUE) |
| var SUPER_CAST | ( | var, | |
| var | |||
| ) | ((TYPE*)VALUE) |
| #define VTABLE | ( | TYPE, | |
| VALUE | |||
| ) | ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable) |
| var VTABLE | ( | var, | |
| var | |||
| ) | ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable) |
| local VTABLE | ( | local, | |
| local | |||
| ) | ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable) |
| void _spAtlasPage_createTexture | ( | spAtlasPage * | self, |
| const char * | path | ||
| ) |
| var _spAtlasPage_createTexture | ( | var | self, |
| var | path | ||
| ) |
| local _spAtlasPage_createTexture | ( | local | self, |
| local | path | ||
| ) |
| void _spAtlasPage_disposeTexture | ( | spAtlasPage * | self) |
| var _spAtlasPage_disposeTexture | ( | var | self) |
| local _spAtlasPage_disposeTexture | ( | local | self) |
| char* _spUtil_readFile | ( | const char * | path, |
| int * | length | ||
| ) |
| var _spUtil_readFile | ( | var | path, |
| var | length | ||
| ) |
| local _spUtil_readFile | ( | local | path, |
| local | length | ||
| ) |
| void* _malloc | ( | size_t | size) |
| var _malloc | ( | var | size) |
| local _malloc | ( | local | size) |
| void* _calloc | ( | size_t | num, |
| size_t | size | ||
| ) |
| var _calloc | ( | var | num, |
| var | size | ||
| ) |
| local _calloc | ( | local | num, |
| local | size | ||
| ) |
| void _free | ( | void * | ptr) |
| var _free | ( | var | ptr) |
| local _free | ( | local | ptr) |
| void _setMalloc | ( | void *(*)(size_t size) | _malloc) |
| var _setMalloc | ( | var | _malloc) |
| local _setMalloc | ( | local | _malloc) |
| void _setFree | ( | void(*)(void *ptr) | _free) |
| var _setFree | ( | var | _free) |
| local _setFree | ( | local | _free) |
| char* _readFile | ( | const char * | path, |
| int * | length | ||
| ) |
| var _readFile | ( | var | path, |
| var | length | ||
| ) |
| local _readFile | ( | local | path, |
| local | length | ||
| ) |
| void _spAttachmentLoader_init | ( | spAttachmentLoader * | self, |
| void(*)(spAttachmentLoader *self) | dispose, | ||
| spAttachment *(*)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name) | newAttachment | ||
| ) |
| var _spAttachmentLoader_init | ( | var | self, |
| var | dispose, | ||
| var | newAttachment | ||
| ) |
| local _spAttachmentLoader_init | ( | local | self, |
| local | dispose, | ||
| local | newAttachment | ||
| ) |
| void _spAttachmentLoader_deinit | ( | spAttachmentLoader * | self) |
| var _spAttachmentLoader_deinit | ( | var | self) |
| local _spAttachmentLoader_deinit | ( | local | self) |
| void _spAttachmentLoader_setError | ( | spAttachmentLoader * | self, |
| const char * | error1, | ||
| const char * | error2 | ||
| ) |
| var _spAttachmentLoader_setError | ( | var | self, |
| var | error1, | ||
| var | error2 | ||
| ) |
| local _spAttachmentLoader_setError | ( | local | self, |
| local | error1, | ||
| local | error2 | ||
| ) |
| void _spAttachmentLoader_setUnknownTypeError |
( | spAttachmentLoader * | self, |
| spAttachmentType | type | ||
| ) |
| var _spAttachmentLoader_setUnknownTypeError |
( | var | self, |
| var | type | ||
| ) |
| local _spAttachmentLoader_setUnknownTypeError |
( | local | self, |
| local | type | ||
| ) |
| void _spAttachment_init | ( | spAttachment * | self, |
| const char * | name, | ||
| spAttachmentType | type, | ||
| void(*)(spAttachment *self) | dispose | ||
| ) |
| var _spAttachment_init | ( | var | self, |
| var | name, | ||
| var | type, | ||
| var | dispose | ||
| ) |
| local _spAttachment_init | ( | local | self, |
| local | name, | ||
| local | type, | ||
| local | dispose | ||
| ) |
| void _spAttachment_deinit | ( | spAttachment * | self) |
| var _spAttachment_deinit | ( | var | self) |
| local _spAttachment_deinit | ( | local | self) |
| void _spTimeline_init | ( | spTimeline * | self, |
| spTimelineType | type, | ||
| void(*)(spTimeline *self) | dispose, | ||
| void(*)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventCount, float alpha) | apply | ||
| ) |
| var _spTimeline_init | ( | var | self, |
| var | type, | ||
| var | dispose, | ||
| var | apply | ||
| ) |
| local _spTimeline_init | ( | local | self, |
| local | type, | ||
| local | dispose, | ||
| local | apply | ||
| ) |
| void _spTimeline_deinit | ( | spTimeline * | self) |
| var _spTimeline_deinit | ( | var | self) |
| local _spTimeline_deinit | ( | local | self) |
| void _spCurveTimeline_init | ( | spCurveTimeline * | self, |
| spTimelineType | type, | ||
| int | frameCount, | ||
| void(*)(spTimeline *self) | dispose, | ||
| void(*)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventCount, float alpha) | apply | ||
| ) |
| var _spCurveTimeline_init | ( | var | self, |
| var | type, | ||
| var | frameCount, | ||
| var | dispose, | ||
| var | apply | ||
| ) |
| local _spCurveTimeline_init | ( | local | self, |
| local | type, | ||
| local | frameCount, | ||
| local | dispose, | ||
| local | apply | ||
| ) |
| void _spCurveTimeline_deinit | ( | spCurveTimeline * | self) |
| var _spCurveTimeline_deinit | ( | var | self) |
| local _spCurveTimeline_deinit | ( | local | self) |