Added ifdefs for C++.

This commit is contained in:
NathanSweet 2013-04-05 22:37:06 +02:00
parent 9af1e9d9b0
commit c9fbe938b8
2 changed files with 18 additions and 0 deletions

View File

@ -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_ */

View File

@ -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