cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extension.h File Reference
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <spine/Skeleton.h>
#include <spine/Animation.h>
#include <spine/Atlas.h>
#include <spine/AttachmentLoader.h>
#include <spine/RegionAttachment.h>
#include <spine/MeshAttachment.h>
#include <spine/SkinnedMeshAttachment.h>
#include <spine/BoundingBoxAttachment.h>
#include <spine/AnimationState.h>

Classes

struct  _spAnimationState
 

Macros

#define MALLOC(TYPE, COUNT)   ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
 
#define CALLOC(TYPE, COUNT)   ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
 
#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(char, strlen(FROM) + 1), FROM)
 
#define PI   3.1415926535897932385f
 
#define DEG_RAD   (PI / 180)
 
#define RAD_DEG   (180 / PI)
 
#define FMOD(A, B)   (float)fmod(A, B)
 
#define ATAN2(A, B)   (float)atan2(A, B)
 
#define COS(A)   (float)cos(A)
 
#define SIN(A)   (float)sin(A)
 
#define SQRT(A)   (float)sqrt(A)
 
#define ACOS(A)   (float)acos(A)
 

Functions

void _spAtlasPage_createTexture (spAtlasPage *self, const char *path)
 
void _spAtlasPage_disposeTexture (spAtlasPage *self)
 
char * _spUtil_readFile (const char *path, int *length)
 
void * _malloc (size_t size, const char *file, int line)
 
void * _calloc (size_t num, size_t size, const char *file, int line)
 
void _free (void *ptr)
 
void _setMalloc (void *(*_malloc)(size_t size))
 
void _setDebugMalloc (void *(*_malloc)(size_t size, const char *file, int line))
 
void _setFree (void(*_free)(void *ptr))
 
char * _readFile (const char *path, int *length)
 
spTrackEntry_spTrackEntry_create (spAnimationState *self)
 
void _spTrackEntry_dispose (spTrackEntry *self)
 
void _spAttachmentLoader_init (spAttachmentLoader *self, void(*dispose)(spAttachmentLoader *self), spAttachment *(*newAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, const char *path))
 
void _spAttachmentLoader_deinit (spAttachmentLoader *self)
 
void _spAttachmentLoader_setError (spAttachmentLoader *self, const char *error1, const char *error2)
 
void _spAttachmentLoader_setUnknownTypeError (spAttachmentLoader *self, spAttachmentType type)
 
void _spAttachment_init (spAttachment *self, const char *name, spAttachmentType type, void(*dispose)(spAttachment *self))
 
void _spAttachment_deinit (spAttachment *self)
 
void _spTimeline_init (spTimeline *self, spTimelineType type, void(*dispose)(spTimeline *self), void(*apply)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha))
 
void _spTimeline_deinit (spTimeline *self)
 
void _spCurveTimeline_init (spCurveTimeline *self, spTimelineType type, int framesCount, void(*dispose)(spTimeline *self), void(*apply)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha))
 
void _spCurveTimeline_deinit (spCurveTimeline *self)
 

Macro Definition Documentation

#define ACOS (   A)    (float)acos(A)
#define ATAN2 (   A,
 
)    (float)atan2(A, B)
#define CALLOC (   TYPE,
  COUNT 
)    ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
#define CONST_CAST (   TYPE,
  VALUE 
)    (*(TYPE*)&VALUE)
#define COS (   A)    (float)cos(A)
#define DEG_RAD   (PI / 180)
#define FMOD (   A,
 
)    (float)fmod(A, B)
#define FREE (   VALUE)    _free((void*)VALUE)
#define MALLOC (   TYPE,
  COUNT 
)    ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
#define MALLOC_STR (   TO,
  FROM 
)    strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
#define NEW (   TYPE)    CALLOC(TYPE,1)
#define PI   3.1415926535897932385f
#define RAD_DEG   (180 / PI)
#define SIN (   A)    (float)sin(A)
#define SQRT (   A)    (float)sqrt(A)
#define SUB_CAST (   TYPE,
  VALUE 
)    ((TYPE*)VALUE)
#define SUPER (   VALUE)    (&VALUE->super)
#define SUPER_CAST (   TYPE,
  VALUE 
)    ((TYPE*)VALUE)
#define VTABLE (   TYPE,
  VALUE 
)    ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable)

Function Documentation

void* _calloc ( size_t  num,
size_t  size,
const char *  file,
int  line 
)
void _free ( void *  ptr)
void* _malloc ( size_t  size,
const char *  file,
int  line 
)
char* _readFile ( const char *  path,
int *  length 
)
void _setDebugMalloc ( void *(*)(size_t size, const char *file, int line)  _malloc)
void _setFree ( void(*)(void *ptr)  _free)
void _setMalloc ( void *(*)(size_t size)  _malloc)
void _spAtlasPage_createTexture ( spAtlasPage self,
const char *  path 
)
void _spAtlasPage_disposeTexture ( spAtlasPage self)
void _spAttachment_deinit ( spAttachment self)
void _spAttachment_init ( spAttachment self,
const char *  name,
spAttachmentType  type,
void(*)(spAttachment *self)  dispose 
)
void _spAttachmentLoader_deinit ( spAttachmentLoader self)
void _spAttachmentLoader_init ( spAttachmentLoader self,
void(*)(spAttachmentLoader *self)  dispose,
spAttachment *(*)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, const char *path)  newAttachment 
)
void _spAttachmentLoader_setError ( spAttachmentLoader self,
const char *  error1,
const char *  error2 
)
void _spAttachmentLoader_setUnknownTypeError ( spAttachmentLoader self,
spAttachmentType  type 
)
void _spCurveTimeline_deinit ( spCurveTimeline self)
void _spCurveTimeline_init ( spCurveTimeline self,
spTimelineType  type,
int  framesCount,
void(*)(spTimeline *self)  dispose,
void(*)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha)  apply 
)
void _spTimeline_deinit ( spTimeline 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 *eventsCount, float alpha)  apply 
)
spTrackEntry* _spTrackEntry_create ( spAnimationState self)
void _spTrackEntry_dispose ( spTrackEntry self)
char* _spUtil_readFile ( const char *  path,
int *  length 
)