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