mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Added ifdefs for C++.
This commit is contained in:
parent
9af1e9d9b0
commit
c9fbe938b8
@ -29,6 +29,11 @@
|
|||||||
#include <spine/spine.h>
|
#include <spine/spine.h>
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace spine {
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AtlasPage super;
|
AtlasPage super;
|
||||||
CCTexture2D* texture;
|
CCTexture2D* texture;
|
||||||
@ -116,4 +121,9 @@ typedef struct {
|
|||||||
CCTextureAtlas* atlas;
|
CCTextureAtlas* atlas;
|
||||||
} Cocos2dRegionAttachment;
|
} Cocos2dRegionAttachment;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* SPINE_COCOS2D_H_ */
|
#endif /* SPINE_COCOS2D_H_ */
|
||||||
|
|||||||
@ -26,6 +26,10 @@
|
|||||||
#include <spine/spine-cocos2d-iphone.h>
|
#include <spine/spine-cocos2d-iphone.h>
|
||||||
#include <spine/extension.h>
|
#include <spine/extension.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
namespace spine {
|
||||||
|
#endif
|
||||||
|
|
||||||
void _Cocos2dAtlasPage_dispose (AtlasPage* page) {
|
void _Cocos2dAtlasPage_dispose (AtlasPage* page) {
|
||||||
Cocos2dAtlasPage* self = SUB_CAST(Cocos2dAtlasPage, page);
|
Cocos2dAtlasPage* self = SUB_CAST(Cocos2dAtlasPage, page);
|
||||||
_AtlasPage_deinit(SUPER(self));
|
_AtlasPage_deinit(SUPER(self));
|
||||||
@ -373,3 +377,7 @@ RegionAttachment* RegionAttachment_create (const char* name, AtlasRegion* region
|
|||||||
char* _Util_readFile (const char* path, int* length) {
|
char* _Util_readFile (const char* path, int* length) {
|
||||||
return _readFile([[[CCFileUtils sharedFileUtils] fullPathForFilename:@(path)] UTF8String], length);
|
return _readFile([[[CCFileUtils sharedFileUtils] fullPathForFilename:@(path)] UTF8String], length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user