cocos2d-x  3.3rc0
 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 *self, const char *path)
void  (spAtlasPage *self)
char *  (const char *path, int *length)
void *  (size_t size, const char *file, int line)
void *  (size_t num, size_t size, const char *file, int line)
void  (void *ptr)
void  (void *(*_malloc)(size_t size))
void  (void *(*_malloc)(size_t size, const char *file, int line))
void  (void(*_free)(void *ptr))
char *  (const char *path, int *length)
spTrackEntry (spAnimationState *self)
void  (spTrackEntry *self)
void  (spAttachmentLoader *self, void(*dispose)(spAttachmentLoader *self), spAttachment *(*newAttachment)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, const char *path))
void  (spAttachmentLoader *self)
void  (spAttachmentLoader *self, const char *error1, const char *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 *eventsCount, float alpha))
var  ( var self, var type, var self, var skeleton, var lastTime, var time, var firedEvents, var eventsCount)
local  ( local self, local type, local self, local skeleton, local lastTime, local time, local firedEvents, local eventsCount)
void  (spTimeline *self)
void  (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 *self)

Macro Definition Documentation

#define ACOS (   A)    (float)acos(A)
var ACOS (   var)    (float)acos(A)
local ACOS (   local)    (float)acos(A)
#define ATAN2 (   A,
 
)    (float)atan2(A, B)
var ATAN2 (   var,
  var 
)    (float)atan2(A, B)
local ATAN2 (   local,
  local 
)    (float)atan2(A, B)
#define CALLOC (   TYPE,
  COUNT 
)    ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
var CALLOC (   var,
  var 
)    ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
local CALLOC (   local,
  local 
)    ((TYPE*)_calloc(COUNT, sizeof(TYPE), __FILE__, __LINE__))
#define CONST_CAST (   TYPE,
  VALUE 
)    (*(TYPE*)&VALUE)
var CONST_CAST (   var,
  var 
)    (*(TYPE*)&VALUE)
local CONST_CAST (   local,
  local 
)    (*(TYPE*)&VALUE)
#define COS (   A)    (float)cos(A)
var COS (   var)    (float)cos(A)
local COS (   local)    (float)cos(A)
#define DEG_RAD   (PI / 180)
var DEG_RAD   (PI / 180)
#define FMOD (   A,
 
)    (float)fmod(A, B)
var FMOD (   var,
  var 
)    (float)fmod(A, B)
local FMOD (   local,
  local 
)    (float)fmod(A, B)
#define FREE (   VALUE)    _free((void*)VALUE)
var FREE (   var)    _free((void*)VALUE)
local FREE (   local)    _free((void*)VALUE)
#define MALLOC (   TYPE,
  COUNT 
)    ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
var MALLOC (   var,
  var 
)    ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
local MALLOC (   local,
  local 
)    ((TYPE*)_malloc(sizeof(TYPE) * COUNT, __FILE__, __LINE__))
#define MALLOC_STR (   TO,
  FROM 
)    strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
var MALLOC_STR (   var,
  var 
)    strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
local MALLOC_STR (   local,
  local 
)    strcpy(CONST_CAST(char*, TO) = (char*)MALLOC(char, strlen(FROM) + 1), FROM)
#define NEW (   TYPE)    CALLOC(TYPE,1)
var NEW (   var)    CALLOC(TYPE,1)
local NEW (   local)    CALLOC(TYPE,1)
#define PI   3.1415926535897932385f
var PI   3.1415926535897932385f
local PI   3.1415926535897932385f
#define RAD_DEG   (180 / PI)
var RAD_DEG   (180 / PI)
local RAD_DEG   (180 / PI)
#define SIN (   A)    (float)sin(A)
var SIN (   var)    (float)sin(A)
local SIN (   local)    (float)sin(A)
#define SQRT (   A)    (float)sqrt(A)
var SQRT (   var)    (float)sqrt(A)
local SQRT (   local)    (float)sqrt(A)
#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)
local SUPER_CAST (   local,
  local 
)    ((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)

Function Documentation

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,
const char *  file,
int  line 
)
var _malloc ( var  size,
var  file,
var  line 
)
local _malloc ( local  size,
local  file,
local  line 
)
void* _calloc ( size_t  num,
size_t  size,
const char *  file,
int  line 
)
var _calloc ( var  num,
var  size,
var  file,
var  line 
)
local _calloc ( local  num,
local  size,
local  file,
local  line 
)
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 _setDebugMalloc ( void *(*)(size_t size, const char *file, int line)  _malloc)
var _setDebugMalloc ( var  _malloc)
local _setDebugMalloc ( 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 
)
spTrackEntry* _spTrackEntry_create ( spAnimationState self)
var _spTrackEntry_create ( var  self)
local _spTrackEntry_create ( local  self)
void _spTrackEntry_dispose ( spTrackEntry self)
var _spTrackEntry_dispose ( var  self)
local _spTrackEntry_dispose ( local  self)
void _spAttachmentLoader_init ( spAttachmentLoader self,
void(*)(spAttachmentLoader *self)  dispose,
spAttachment *(*)(spAttachmentLoader *self, spSkin *skin, spAttachmentType type, const char *name, const char *path)  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 *eventsCount, 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  framesCount,
void(*)(spTimeline *self)  dispose,
void(*)(const spTimeline *self, spSkeleton *skeleton, float lastTime, float time, spEvent **firedEvents, int *eventsCount, float alpha)  apply 
)
var _spCurveTimeline_init ( var  self,
var  type,
var  framesCount,
var  dispose,
var  apply 
)
local _spCurveTimeline_init ( local  self,
local  type,
local  framesCount,
local  dispose,
local  apply 
)
void _spCurveTimeline_deinit ( spCurveTimeline self)
var _spCurveTimeline_deinit ( var  self)
local _spCurveTimeline_deinit ( local  self)