- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件
-
)
- 文件列表
- 文件成员
全部) 类) 命名空间) 文件) 函数) 变量) 类型定义) 枚举) 枚举值) 属性) 友元) 宏定义) 组) 页)
宏定义 | 函数
extension.h 文件参考
#include
#include
#include
#include
#include
#include
#include
#include
#include
## 宏定义
|
#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) |
|
## 函数
|
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) |
|
void | _calloc (size_t num, size_t size) |
|
void | _free (void ptr) |
|
void | _setMalloc (void (_malloc)(size_t size)) |
|
void | _setFree (void(_free)(void ptr)) |
|
char | _readFile (const char path, int length) |
|
void | _spAttachmentLoader_init (spAttachmentLoader self, void(dispose)(spAttachmentLoader self), spAttachment (newAttachment)(spAttachmentLoader self, spSkin skin, spAttachmentType type, const char name)) |
|
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 eventCount, float alpha)) |
|
void | _spTimeline_deinit (spTimeline self) |
|
void | _spCurveTimeline_init (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_deinit (spCurveTimeline self) |
|
宏定义说明
#define CALLOC | ( | | TYPE, |
| | | COUNT |
| ) | | ((TYPE*)_calloc(COUNT, sizeof(TYPE))) |
#define CONST_CAST | ( | | TYPE, |
| | | VALUE |
| ) | | ((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)) |
#define MALLOC_STR | ( | | TO, |
| | | FROM |
| ) | | strcpy(CONST_CAST(char, TO) = (char)malloc(strlen(FROM) + 1), FROM) |
#define NEW | ( | | TYPE | ) | CALLOC(TYPE,1) |
#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) |
函数说明
void* _calloc | ( | size_t | num, |
| | size_t | size |
| ) | | |
void* _malloc | ( | size_t | size | ) | |
char _readFile | ( | const char | path, |
| | int * | length |
| ) | | |
void _setFree | ( | void()(void ptr) | _free | ) | |
void _setMalloc | ( | void ()(size_t size) | _malloc | ) | |
void _spAtlasPage_createTexture | ( | spAtlasPage | self, |
| | const char | path |
| ) | | |
void _spAttachmentLoader_setError | ( | spAttachmentLoader | self, |
| | const char | error1, |
| | const char * | error2 |
| ) | | |
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 |
| ) | | |
char _spUtil_readFile | ( | const char | path, |
| | int * | length |
| ) | | |