mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Fixed spine-cocos2d for v3.0. Removed short names.
This commit is contained in:
parent
57b68c78e8
commit
df78473cf7
@ -23,24 +23,20 @@
|
||||
[self addChild:skeletonNode];
|
||||
|
||||
self.userInteractionEnabled = YES;
|
||||
|
||||
self.contentSize = windowSize;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#if __CC_PLATFORM_MAC
|
||||
- (BOOL) ccMouseDown:(NSEvent*)event {
|
||||
#else
|
||||
- (void) ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
|
||||
#endif
|
||||
#if ( TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR )
|
||||
- (void)touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
|
||||
if (!skeletonNode.debugBones)
|
||||
skeletonNode.debugBones = true;
|
||||
else if (skeletonNode.timeScale == 1)
|
||||
skeletonNode.timeScale = 0.3f;
|
||||
else
|
||||
[[CCDirector sharedDirector] replaceScene:[SpineboyExample scene]];
|
||||
#if __CC_PLATFORM_MAC
|
||||
return YES;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
};
|
||||
|
||||
[skeletonNode setAnimationForTrack:0 name:@"walk" loop:YES];
|
||||
TrackEntry* jumpEntry = [skeletonNode addAnimationForTrack:0 name:@"jump" loop:NO afterDelay:3];
|
||||
spTrackEntry* jumpEntry = [skeletonNode addAnimationForTrack:0 name:@"jump" loop:NO afterDelay:3];
|
||||
[skeletonNode addAnimationForTrack:0 name:@"run" loop:YES afterDelay:0];
|
||||
|
||||
[skeletonNode setListenerForEntry:jumpEntry onStart:^(int trackIndex) {
|
||||
@ -49,24 +49,20 @@
|
||||
[self addChild:skeletonNode];
|
||||
|
||||
self.userInteractionEnabled = YES;
|
||||
self.contentSize = windowSize;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#if __CC_PLATFORM_MAC
|
||||
- (BOOL) ccMouseDown:(NSEvent*)event {
|
||||
#else
|
||||
- (void) ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
|
||||
#endif
|
||||
#if ( TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR )
|
||||
- (void)touchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
|
||||
if (!skeletonNode.debugBones)
|
||||
skeletonNode.debugBones = true;
|
||||
else if (skeletonNode.timeScale == 1)
|
||||
skeletonNode.timeScale = 0.3f;
|
||||
else
|
||||
[[CCDirector sharedDirector] replaceScene:[GoblinsExample scene]];
|
||||
#if __CC_PLATFORM_MAC
|
||||
return YES;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,693 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
43BFBE0F170A778A00ECBACB /* spine-cocos2d-iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
43C32A1B170B1295004A9460 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A11170B1295004A9460 /* AppDelegate.m */; };
|
||||
43C32A1C170B1295004A9460 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A13170B1295004A9460 /* InfoPlist.strings */; };
|
||||
43C32A1D170B1295004A9460 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A15170B1295004A9460 /* MainMenu.xib */; };
|
||||
43C32A1E170B1295004A9460 /* icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A17170B1295004A9460 /* icon.icns */; };
|
||||
43C32A20170B1295004A9460 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A19170B1295004A9460 /* main.m */; };
|
||||
43C32A36170D0A4D004A9460 /* spineboy.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A30170D0A4D004A9460 /* spineboy.atlas */; };
|
||||
43C32A37170D0A4D004A9460 /* spineboy.json in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A31170D0A4D004A9460 /* spineboy.json */; };
|
||||
43C32A38170D0A4D004A9460 /* spineboy.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32A32170D0A4D004A9460 /* spineboy.png */; };
|
||||
43F7FD711927C31700CA4038 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD581927C31700CA4038 /* Animation.c */; };
|
||||
43F7FD721927C31700CA4038 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD591927C31700CA4038 /* AnimationState.c */; };
|
||||
43F7FD731927C31700CA4038 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5A1927C31700CA4038 /* AnimationStateData.c */; };
|
||||
43F7FD741927C31700CA4038 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5B1927C31700CA4038 /* Atlas.c */; };
|
||||
43F7FD751927C31700CA4038 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */; };
|
||||
43F7FD761927C31700CA4038 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5D1927C31700CA4038 /* Attachment.c */; };
|
||||
43F7FD771927C31700CA4038 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */; };
|
||||
43F7FD781927C31700CA4038 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD5F1927C31700CA4038 /* Bone.c */; };
|
||||
43F7FD791927C31700CA4038 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD601927C31700CA4038 /* BoneData.c */; };
|
||||
43F7FD7A1927C31700CA4038 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */; };
|
||||
43F7FD7B1927C31700CA4038 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD621927C31700CA4038 /* Event.c */; };
|
||||
43F7FD7C1927C31700CA4038 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD631927C31700CA4038 /* EventData.c */; };
|
||||
43F7FD7D1927C31700CA4038 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD641927C31700CA4038 /* extension.c */; };
|
||||
43F7FD7E1927C31700CA4038 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD651927C31700CA4038 /* Json.c */; };
|
||||
43F7FD7F1927C31700CA4038 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD671927C31700CA4038 /* MeshAttachment.c */; };
|
||||
43F7FD801927C31700CA4038 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD681927C31700CA4038 /* RegionAttachment.c */; };
|
||||
43F7FD811927C31700CA4038 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD691927C31700CA4038 /* Skeleton.c */; };
|
||||
43F7FD821927C31700CA4038 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */; };
|
||||
43F7FD831927C31700CA4038 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6B1927C31700CA4038 /* SkeletonData.c */; };
|
||||
43F7FD841927C31700CA4038 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6C1927C31700CA4038 /* SkeletonJson.c */; };
|
||||
43F7FD851927C31700CA4038 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6D1927C31700CA4038 /* Skin.c */; };
|
||||
43F7FD861927C31700CA4038 /* SkinnedMeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */; };
|
||||
43F7FD871927C31700CA4038 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD6F1927C31700CA4038 /* Slot.c */; };
|
||||
43F7FD881927C31700CA4038 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FD701927C31700CA4038 /* SlotData.c */; };
|
||||
43F7FDA71927C33C00CA4038 /* PolygonBatch.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDA21927C33C00CA4038 /* PolygonBatch.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
43F7FDA81927C33C00CA4038 /* SkeletonAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
43F7FDA91927C33C00CA4038 /* SkeletonRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
|
||||
43F7FDAC1927C34600CA4038 /* SpineboyExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDAB1927C34600CA4038 /* SpineboyExample.m */; };
|
||||
43F7FDB01927C35600CA4038 /* goblins-ffd.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */; };
|
||||
43F7FDB11927C35600CA4038 /* goblins-ffd.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAE1927C35600CA4038 /* goblins-ffd.json */; };
|
||||
43F7FDB21927C35600CA4038 /* goblins-ffd.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7FDAF1927C35600CA4038 /* goblins-ffd.png */; };
|
||||
43F7FDB51927D04200CA4038 /* GoblinsExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FDB41927D04200CA4038 /* GoblinsExample.m */; };
|
||||
A2BD1E68192A41C100405470 /* libcocos2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E63192A417300405470 /* libcocos2d.a */; };
|
||||
A2BD1E73192A47A000405470 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6C192A47A000405470 /* AVFoundation.framework */; };
|
||||
A2BD1E74192A47A000405470 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6D192A47A000405470 /* QuartzCore.framework */; };
|
||||
A2BD1E75192A47A000405470 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6E192A47A000405470 /* OpenGL.framework */; };
|
||||
A2BD1E76192A47A000405470 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E6F192A47A000405470 /* OpenAL.framework */; };
|
||||
A2BD1E77192A47A000405470 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E70192A47A000405470 /* AudioToolbox.framework */; };
|
||||
A2BD1E78192A47A000405470 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E71192A47A000405470 /* AppKit.framework */; };
|
||||
A2BD1E79192A47A000405470 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A2BD1E72192A47A000405470 /* Foundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
A2BD1E62192A417300405470 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = E01E663D121CA00A001A484F;
|
||||
remoteInfo = cocos2d;
|
||||
};
|
||||
A2BD1E64192A417300405470 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = A06430E713C1414300CC5554;
|
||||
remoteInfo = kazmath;
|
||||
};
|
||||
A2BD1E66192A417300405470 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = D37EE9FC187D4E7700CB5EF2;
|
||||
remoteInfo = ObjectiveChipmunk;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4319B51316FF9B2600C1D7A9 /* SpineExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpineExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "spine-cocos2d-iphone.m"; path = "src/spine/spine-cocos2d-iphone.m"; sourceTree = "<group>"; };
|
||||
43BFBE0E170A778A00ECBACB /* spine-cocos2d-iphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "spine-cocos2d-iphone.h"; path = "src/spine/spine-cocos2d-iphone.h"; sourceTree = "<group>"; };
|
||||
43C32A10170B1295004A9460 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "../Resources-mac/AppDelegate.h"; sourceTree = "<group>"; };
|
||||
43C32A11170B1295004A9460 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "../Resources-mac/AppDelegate.m"; sourceTree = "<group>"; };
|
||||
43C32A14170B1295004A9460 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = InfoPlist.strings; sourceTree = "<group>"; };
|
||||
43C32A16170B1295004A9460 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = MainMenu.xib; sourceTree = "<group>"; };
|
||||
43C32A17170B1295004A9460 /* icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = icon.icns; path = "Resources-mac/icon.icns"; sourceTree = "<group>"; };
|
||||
43C32A18170B1295004A9460 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Resources-mac/Info.plist"; sourceTree = "<group>"; };
|
||||
43C32A19170B1295004A9460 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "../Resources-mac/main.m"; sourceTree = "<group>"; };
|
||||
43C32A1A170B1295004A9460 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = "../Resources-mac/Prefix.pch"; sourceTree = "<group>"; };
|
||||
43C32A30170D0A4D004A9460 /* spineboy.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = spineboy.atlas; sourceTree = "<group>"; };
|
||||
43C32A31170D0A4D004A9460 /* spineboy.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = spineboy.json; sourceTree = "<group>"; };
|
||||
43C32A32170D0A4D004A9460 /* spineboy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = spineboy.png; sourceTree = "<group>"; };
|
||||
43F7FD581927C31700CA4038 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../spine-c/src/spine/Animation.c"; sourceTree = "<group>"; };
|
||||
43F7FD591927C31700CA4038 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../spine-c/src/spine/AnimationState.c"; sourceTree = "<group>"; };
|
||||
43F7FD5A1927C31700CA4038 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../spine-c/src/spine/AnimationStateData.c"; sourceTree = "<group>"; };
|
||||
43F7FD5B1927C31700CA4038 /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Atlas.c; path = "../../spine-c/src/spine/Atlas.c"; sourceTree = "<group>"; };
|
||||
43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AtlasAttachmentLoader.c; path = "../../spine-c/src/spine/AtlasAttachmentLoader.c"; sourceTree = "<group>"; };
|
||||
43F7FD5D1927C31700CA4038 /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Attachment.c; path = "../../spine-c/src/spine/Attachment.c"; sourceTree = "<group>"; };
|
||||
43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AttachmentLoader.c; path = "../../spine-c/src/spine/AttachmentLoader.c"; sourceTree = "<group>"; };
|
||||
43F7FD5F1927C31700CA4038 /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Bone.c; path = "../../spine-c/src/spine/Bone.c"; sourceTree = "<group>"; };
|
||||
43F7FD601927C31700CA4038 /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoneData.c; path = "../../spine-c/src/spine/BoneData.c"; sourceTree = "<group>"; };
|
||||
43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoundingBoxAttachment.c; path = "../../spine-c/src/spine/BoundingBoxAttachment.c"; sourceTree = "<group>"; };
|
||||
43F7FD621927C31700CA4038 /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Event.c; path = "../../spine-c/src/spine/Event.c"; sourceTree = "<group>"; };
|
||||
43F7FD631927C31700CA4038 /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = EventData.c; path = "../../spine-c/src/spine/EventData.c"; sourceTree = "<group>"; };
|
||||
43F7FD641927C31700CA4038 /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = extension.c; path = "../../spine-c/src/spine/extension.c"; sourceTree = "<group>"; };
|
||||
43F7FD651927C31700CA4038 /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Json.c; path = "../../spine-c/src/spine/Json.c"; sourceTree = "<group>"; };
|
||||
43F7FD661927C31700CA4038 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Json.h; path = "../../spine-c/src/spine/Json.h"; sourceTree = "<group>"; };
|
||||
43F7FD671927C31700CA4038 /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = MeshAttachment.c; path = "../../spine-c/src/spine/MeshAttachment.c"; sourceTree = "<group>"; };
|
||||
43F7FD681927C31700CA4038 /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = RegionAttachment.c; path = "../../spine-c/src/spine/RegionAttachment.c"; sourceTree = "<group>"; };
|
||||
43F7FD691927C31700CA4038 /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skeleton.c; path = "../../spine-c/src/spine/Skeleton.c"; sourceTree = "<group>"; };
|
||||
43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonBounds.c; path = "../../spine-c/src/spine/SkeletonBounds.c"; sourceTree = "<group>"; };
|
||||
43F7FD6B1927C31700CA4038 /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonData.c; path = "../../spine-c/src/spine/SkeletonData.c"; sourceTree = "<group>"; };
|
||||
43F7FD6C1927C31700CA4038 /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonJson.c; path = "../../spine-c/src/spine/SkeletonJson.c"; sourceTree = "<group>"; };
|
||||
43F7FD6D1927C31700CA4038 /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skin.c; path = "../../spine-c/src/spine/Skin.c"; sourceTree = "<group>"; };
|
||||
43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkinnedMeshAttachment.c; path = "../../spine-c/src/spine/SkinnedMeshAttachment.c"; sourceTree = "<group>"; };
|
||||
43F7FD6F1927C31700CA4038 /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Slot.c; path = "../../spine-c/src/spine/Slot.c"; sourceTree = "<group>"; };
|
||||
43F7FD701927C31700CA4038 /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SlotData.c; path = "../../spine-c/src/spine/SlotData.c"; sourceTree = "<group>"; };
|
||||
43F7FD891927C32800CA4038 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Animation.h; path = "../../spine-c/include/spine/Animation.h"; sourceTree = "<group>"; };
|
||||
43F7FD8A1927C32800CA4038 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationState.h; path = "../../spine-c/include/spine/AnimationState.h"; sourceTree = "<group>"; };
|
||||
43F7FD8B1927C32800CA4038 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationStateData.h; path = "../../spine-c/include/spine/AnimationStateData.h"; sourceTree = "<group>"; };
|
||||
43F7FD8C1927C32800CA4038 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Atlas.h; path = "../../spine-c/include/spine/Atlas.h"; sourceTree = "<group>"; };
|
||||
43F7FD8D1927C32800CA4038 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtlasAttachmentLoader.h; path = "../../spine-c/include/spine/AtlasAttachmentLoader.h"; sourceTree = "<group>"; };
|
||||
43F7FD8E1927C32800CA4038 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Attachment.h; path = "../../spine-c/include/spine/Attachment.h"; sourceTree = "<group>"; };
|
||||
43F7FD8F1927C32800CA4038 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentLoader.h; path = "../../spine-c/include/spine/AttachmentLoader.h"; sourceTree = "<group>"; };
|
||||
43F7FD901927C32800CA4038 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bone.h; path = "../../spine-c/include/spine/Bone.h"; sourceTree = "<group>"; };
|
||||
43F7FD911927C32800CA4038 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoneData.h; path = "../../spine-c/include/spine/BoneData.h"; sourceTree = "<group>"; };
|
||||
43F7FD921927C32800CA4038 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoundingBoxAttachment.h; path = "../../spine-c/include/spine/BoundingBoxAttachment.h"; sourceTree = "<group>"; };
|
||||
43F7FD931927C32800CA4038 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = "../../spine-c/include/spine/Event.h"; sourceTree = "<group>"; };
|
||||
43F7FD941927C32800CA4038 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EventData.h; path = "../../spine-c/include/spine/EventData.h"; sourceTree = "<group>"; };
|
||||
43F7FD951927C32800CA4038 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extension.h; path = "../../spine-c/include/spine/extension.h"; sourceTree = "<group>"; };
|
||||
43F7FD961927C32800CA4038 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MeshAttachment.h; path = "../../spine-c/include/spine/MeshAttachment.h"; sourceTree = "<group>"; };
|
||||
43F7FD971927C32800CA4038 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegionAttachment.h; path = "../../spine-c/include/spine/RegionAttachment.h"; sourceTree = "<group>"; };
|
||||
43F7FD981927C32800CA4038 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skeleton.h; path = "../../spine-c/include/spine/Skeleton.h"; sourceTree = "<group>"; };
|
||||
43F7FD991927C32800CA4038 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBounds.h; path = "../../spine-c/include/spine/SkeletonBounds.h"; sourceTree = "<group>"; };
|
||||
43F7FD9A1927C32800CA4038 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonData.h; path = "../../spine-c/include/spine/SkeletonData.h"; sourceTree = "<group>"; };
|
||||
43F7FD9B1927C32800CA4038 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonJson.h; path = "../../spine-c/include/spine/SkeletonJson.h"; sourceTree = "<group>"; };
|
||||
43F7FD9C1927C32800CA4038 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skin.h; path = "../../spine-c/include/spine/Skin.h"; sourceTree = "<group>"; };
|
||||
43F7FD9D1927C32800CA4038 /* SkinnedMeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkinnedMeshAttachment.h; path = "../../spine-c/include/spine/SkinnedMeshAttachment.h"; sourceTree = "<group>"; };
|
||||
43F7FD9E1927C32800CA4038 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Slot.h; path = "../../spine-c/include/spine/Slot.h"; sourceTree = "<group>"; };
|
||||
43F7FD9F1927C32800CA4038 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SlotData.h; path = "../../spine-c/include/spine/SlotData.h"; sourceTree = "<group>"; };
|
||||
43F7FDA01927C32800CA4038 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spine.h; path = "../../spine-c/include/spine/spine.h"; sourceTree = "<group>"; };
|
||||
43F7FDA11927C33C00CA4038 /* PolygonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolygonBatch.h; path = src/spine/PolygonBatch.h; sourceTree = "<group>"; };
|
||||
43F7FDA21927C33C00CA4038 /* PolygonBatch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PolygonBatch.m; path = src/spine/PolygonBatch.m; sourceTree = "<group>"; };
|
||||
43F7FDA31927C33C00CA4038 /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = src/spine/SkeletonAnimation.h; sourceTree = "<group>"; };
|
||||
43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonAnimation.m; path = src/spine/SkeletonAnimation.m; sourceTree = "<group>"; };
|
||||
43F7FDA51927C33C00CA4038 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonRenderer.h; path = src/spine/SkeletonRenderer.h; sourceTree = "<group>"; };
|
||||
43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonRenderer.m; path = src/spine/SkeletonRenderer.m; sourceTree = "<group>"; };
|
||||
43F7FDAA1927C34600CA4038 /* SpineboyExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpineboyExample.h; sourceTree = "<group>"; };
|
||||
43F7FDAB1927C34600CA4038 /* SpineboyExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpineboyExample.m; sourceTree = "<group>"; };
|
||||
43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "goblins-ffd.atlas"; sourceTree = "<group>"; };
|
||||
43F7FDAE1927C35600CA4038 /* goblins-ffd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "goblins-ffd.json"; sourceTree = "<group>"; };
|
||||
43F7FDAF1927C35600CA4038 /* goblins-ffd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "goblins-ffd.png"; sourceTree = "<group>"; };
|
||||
43F7FDB31927D04200CA4038 /* GoblinsExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GoblinsExample.h; sourceTree = "<group>"; };
|
||||
43F7FDB41927D04200CA4038 /* GoblinsExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GoblinsExample.m; sourceTree = "<group>"; };
|
||||
A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-osx.xcodeproj"; path = "cocos2d/cocos2d-osx.xcodeproj"; sourceTree = SOURCE_ROOT; };
|
||||
A2BD1E6C192A47A000405470 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E6D192A47A000405470 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E6E192A47A000405470 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E6F192A47A000405470 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E70192A47A000405470 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E71192A47A000405470 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
A2BD1E72192A47A000405470 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4319B51016FF9B2600C1D7A9 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
A2BD1E78192A47A000405470 /* AppKit.framework in Frameworks */,
|
||||
A2BD1E73192A47A000405470 /* AVFoundation.framework in Frameworks */,
|
||||
A2BD1E75192A47A000405470 /* OpenGL.framework in Frameworks */,
|
||||
A2BD1E68192A41C100405470 /* libcocos2d.a in Frameworks */,
|
||||
A2BD1E76192A47A000405470 /* OpenAL.framework in Frameworks */,
|
||||
A2BD1E74192A47A000405470 /* QuartzCore.framework in Frameworks */,
|
||||
A2BD1E77192A47A000405470 /* AudioToolbox.framework in Frameworks */,
|
||||
A2BD1E79192A47A000405470 /* Foundation.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4319B50816FF9B2600C1D7A9 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4319B6BC16FF9D1700C1D7A9 /* Classes */,
|
||||
4319B7CB16FF9D3900C1D7A9 /* Resources */,
|
||||
43C32A0F170B1282004A9460 /* Resources-mac */,
|
||||
4319B6C616FF9D3900C1D7A9 /* cocos2d */,
|
||||
4319B51616FF9B2600C1D7A9 /* Frameworks */,
|
||||
4319B51416FF9B2600C1D7A9 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4319B51416FF9B2600C1D7A9 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4319B51316FF9B2600C1D7A9 /* SpineExample.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4319B51616FF9B2600C1D7A9 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A2BD1E6C192A47A000405470 /* AVFoundation.framework */,
|
||||
A2BD1E6D192A47A000405470 /* QuartzCore.framework */,
|
||||
A2BD1E6E192A47A000405470 /* OpenGL.framework */,
|
||||
A2BD1E6F192A47A000405470 /* OpenAL.framework */,
|
||||
A2BD1E70192A47A000405470 /* AudioToolbox.framework */,
|
||||
A2BD1E71192A47A000405470 /* AppKit.framework */,
|
||||
A2BD1E72192A47A000405470 /* Foundation.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4319B6BC16FF9D1700C1D7A9 /* Classes */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4319B8921701168A00C1D7A9 /* spine-c */,
|
||||
4319B8931701168F00C1D7A9 /* spine-cocos2d-iphone */,
|
||||
43F7FDAA1927C34600CA4038 /* SpineboyExample.h */,
|
||||
43F7FDAB1927C34600CA4038 /* SpineboyExample.m */,
|
||||
43F7FDB31927D04200CA4038 /* GoblinsExample.h */,
|
||||
43F7FDB41927D04200CA4038 /* GoblinsExample.m */,
|
||||
43C32A10170B1295004A9460 /* AppDelegate.h */,
|
||||
43C32A11170B1295004A9460 /* AppDelegate.m */,
|
||||
43C32A19170B1295004A9460 /* main.m */,
|
||||
43C32A1A170B1295004A9460 /* Prefix.pch */,
|
||||
);
|
||||
name = Classes;
|
||||
path = example;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
4319B6C616FF9D3900C1D7A9 /* cocos2d */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */,
|
||||
);
|
||||
name = cocos2d;
|
||||
path = libs;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
4319B7CB16FF9D3900C1D7A9 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43F7FDAD1927C35600CA4038 /* goblins-ffd.atlas */,
|
||||
43F7FDAE1927C35600CA4038 /* goblins-ffd.json */,
|
||||
43F7FDAF1927C35600CA4038 /* goblins-ffd.png */,
|
||||
43C32A30170D0A4D004A9460 /* spineboy.atlas */,
|
||||
43C32A31170D0A4D004A9460 /* spineboy.json */,
|
||||
43C32A32170D0A4D004A9460 /* spineboy.png */,
|
||||
);
|
||||
path = Resources;
|
||||
sourceTree = SOURCE_ROOT;
|
||||
};
|
||||
4319B8921701168A00C1D7A9 /* spine-c */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43F7FD581927C31700CA4038 /* Animation.c */,
|
||||
43F7FD891927C32800CA4038 /* Animation.h */,
|
||||
43F7FD591927C31700CA4038 /* AnimationState.c */,
|
||||
43F7FD8A1927C32800CA4038 /* AnimationState.h */,
|
||||
43F7FD5A1927C31700CA4038 /* AnimationStateData.c */,
|
||||
43F7FD8B1927C32800CA4038 /* AnimationStateData.h */,
|
||||
43F7FD5B1927C31700CA4038 /* Atlas.c */,
|
||||
43F7FD8C1927C32800CA4038 /* Atlas.h */,
|
||||
43F7FD5C1927C31700CA4038 /* AtlasAttachmentLoader.c */,
|
||||
43F7FD8D1927C32800CA4038 /* AtlasAttachmentLoader.h */,
|
||||
43F7FD5D1927C31700CA4038 /* Attachment.c */,
|
||||
43F7FD8E1927C32800CA4038 /* Attachment.h */,
|
||||
43F7FD5E1927C31700CA4038 /* AttachmentLoader.c */,
|
||||
43F7FD8F1927C32800CA4038 /* AttachmentLoader.h */,
|
||||
43F7FD5F1927C31700CA4038 /* Bone.c */,
|
||||
43F7FD901927C32800CA4038 /* Bone.h */,
|
||||
43F7FD601927C31700CA4038 /* BoneData.c */,
|
||||
43F7FD911927C32800CA4038 /* BoneData.h */,
|
||||
43F7FD611927C31700CA4038 /* BoundingBoxAttachment.c */,
|
||||
43F7FD921927C32800CA4038 /* BoundingBoxAttachment.h */,
|
||||
43F7FD621927C31700CA4038 /* Event.c */,
|
||||
43F7FD931927C32800CA4038 /* Event.h */,
|
||||
43F7FD631927C31700CA4038 /* EventData.c */,
|
||||
43F7FD941927C32800CA4038 /* EventData.h */,
|
||||
43F7FD641927C31700CA4038 /* extension.c */,
|
||||
43F7FD951927C32800CA4038 /* extension.h */,
|
||||
43F7FD651927C31700CA4038 /* Json.c */,
|
||||
43F7FD661927C31700CA4038 /* Json.h */,
|
||||
43F7FD671927C31700CA4038 /* MeshAttachment.c */,
|
||||
43F7FD961927C32800CA4038 /* MeshAttachment.h */,
|
||||
43F7FD681927C31700CA4038 /* RegionAttachment.c */,
|
||||
43F7FD971927C32800CA4038 /* RegionAttachment.h */,
|
||||
43F7FD691927C31700CA4038 /* Skeleton.c */,
|
||||
43F7FD981927C32800CA4038 /* Skeleton.h */,
|
||||
43F7FD6A1927C31700CA4038 /* SkeletonBounds.c */,
|
||||
43F7FD991927C32800CA4038 /* SkeletonBounds.h */,
|
||||
43F7FD6B1927C31700CA4038 /* SkeletonData.c */,
|
||||
43F7FD9A1927C32800CA4038 /* SkeletonData.h */,
|
||||
43F7FD6C1927C31700CA4038 /* SkeletonJson.c */,
|
||||
43F7FD9B1927C32800CA4038 /* SkeletonJson.h */,
|
||||
43F7FD6D1927C31700CA4038 /* Skin.c */,
|
||||
43F7FD9C1927C32800CA4038 /* Skin.h */,
|
||||
43F7FD6E1927C31700CA4038 /* SkinnedMeshAttachment.c */,
|
||||
43F7FD9D1927C32800CA4038 /* SkinnedMeshAttachment.h */,
|
||||
43F7FD6F1927C31700CA4038 /* Slot.c */,
|
||||
43F7FD9E1927C32800CA4038 /* Slot.h */,
|
||||
43F7FD701927C31700CA4038 /* SlotData.c */,
|
||||
43F7FD9F1927C32800CA4038 /* SlotData.h */,
|
||||
43F7FDA01927C32800CA4038 /* spine.h */,
|
||||
);
|
||||
name = "spine-c";
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4319B8931701168F00C1D7A9 /* spine-cocos2d-iphone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43F7FDA11927C33C00CA4038 /* PolygonBatch.h */,
|
||||
43F7FDA21927C33C00CA4038 /* PolygonBatch.m */,
|
||||
43F7FDA31927C33C00CA4038 /* SkeletonAnimation.h */,
|
||||
43F7FDA41927C33C00CA4038 /* SkeletonAnimation.m */,
|
||||
43F7FDA51927C33C00CA4038 /* SkeletonRenderer.h */,
|
||||
43F7FDA61927C33C00CA4038 /* SkeletonRenderer.m */,
|
||||
43BFBE0D170A778A00ECBACB /* spine-cocos2d-iphone.m */,
|
||||
43BFBE0E170A778A00ECBACB /* spine-cocos2d-iphone.h */,
|
||||
);
|
||||
name = "spine-cocos2d-iphone";
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
43C32A0F170B1282004A9460 /* Resources-mac */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43C32A12170B1295004A9460 /* English.lproj */,
|
||||
43C32A17170B1295004A9460 /* icon.icns */,
|
||||
43C32A18170B1295004A9460 /* Info.plist */,
|
||||
);
|
||||
name = "Resources-mac";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
43C32A12170B1295004A9460 /* English.lproj */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
43C32A13170B1295004A9460 /* InfoPlist.strings */,
|
||||
43C32A15170B1295004A9460 /* MainMenu.xib */,
|
||||
);
|
||||
name = English.lproj;
|
||||
path = "Resources-mac/English.lproj";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A2BD1E5D192A417300405470 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
A2BD1E63192A417300405470 /* libcocos2d.a */,
|
||||
A2BD1E65192A417300405470 /* libkazmath.a */,
|
||||
A2BD1E67192A417300405470 /* libObjectiveChipmunk.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4319B51216FF9B2600C1D7A9 /* SpineExample */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4319B6AC16FF9B2B00C1D7A9 /* Build configuration list for PBXNativeTarget "SpineExample" */;
|
||||
buildPhases = (
|
||||
4319B50F16FF9B2600C1D7A9 /* Sources */,
|
||||
4319B51016FF9B2600C1D7A9 /* Frameworks */,
|
||||
4319B51116FF9B2600C1D7A9 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = SpineExample;
|
||||
productName = "spine-cocos2d-iphone-mac";
|
||||
productReference = 4319B51316FF9B2600C1D7A9 /* SpineExample.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4319B50A16FF9B2600C1D7A9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0510;
|
||||
ORGANIZATIONNAME = "Esoteric Software";
|
||||
};
|
||||
buildConfigurationList = 4319B50D16FF9B2600C1D7A9 /* Build configuration list for PBXProject "spine-cocos2d-iphone-osx" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
English,
|
||||
);
|
||||
mainGroup = 4319B50816FF9B2600C1D7A9;
|
||||
productRefGroup = 4319B51416FF9B2600C1D7A9 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = A2BD1E5D192A417300405470 /* Products */;
|
||||
ProjectRef = A2BD1E5C192A417300405470 /* cocos2d-osx.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4319B51216FF9B2600C1D7A9 /* SpineExample */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
A2BD1E63192A417300405470 /* libcocos2d.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libcocos2d.a;
|
||||
remoteRef = A2BD1E62192A417300405470 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
A2BD1E65192A417300405470 /* libkazmath.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libkazmath.a;
|
||||
remoteRef = A2BD1E64192A417300405470 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
A2BD1E67192A417300405470 /* libObjectiveChipmunk.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libObjectiveChipmunk.a;
|
||||
remoteRef = A2BD1E66192A417300405470 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4319B51116FF9B2600C1D7A9 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
43C32A1C170B1295004A9460 /* InfoPlist.strings in Resources */,
|
||||
43C32A1D170B1295004A9460 /* MainMenu.xib in Resources */,
|
||||
43C32A1E170B1295004A9460 /* icon.icns in Resources */,
|
||||
43C32A36170D0A4D004A9460 /* spineboy.atlas in Resources */,
|
||||
43C32A37170D0A4D004A9460 /* spineboy.json in Resources */,
|
||||
43C32A38170D0A4D004A9460 /* spineboy.png in Resources */,
|
||||
43F7FDB01927C35600CA4038 /* goblins-ffd.atlas in Resources */,
|
||||
43F7FDB11927C35600CA4038 /* goblins-ffd.json in Resources */,
|
||||
43F7FDB21927C35600CA4038 /* goblins-ffd.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4319B50F16FF9B2600C1D7A9 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
43BFBE0F170A778A00ECBACB /* spine-cocos2d-iphone.m in Sources */,
|
||||
43C32A1B170B1295004A9460 /* AppDelegate.m in Sources */,
|
||||
43C32A20170B1295004A9460 /* main.m in Sources */,
|
||||
43F7FD711927C31700CA4038 /* Animation.c in Sources */,
|
||||
43F7FD721927C31700CA4038 /* AnimationState.c in Sources */,
|
||||
43F7FD731927C31700CA4038 /* AnimationStateData.c in Sources */,
|
||||
43F7FD741927C31700CA4038 /* Atlas.c in Sources */,
|
||||
43F7FD751927C31700CA4038 /* AtlasAttachmentLoader.c in Sources */,
|
||||
43F7FD761927C31700CA4038 /* Attachment.c in Sources */,
|
||||
43F7FD771927C31700CA4038 /* AttachmentLoader.c in Sources */,
|
||||
43F7FD781927C31700CA4038 /* Bone.c in Sources */,
|
||||
43F7FD791927C31700CA4038 /* BoneData.c in Sources */,
|
||||
43F7FD7A1927C31700CA4038 /* BoundingBoxAttachment.c in Sources */,
|
||||
43F7FD7B1927C31700CA4038 /* Event.c in Sources */,
|
||||
43F7FD7C1927C31700CA4038 /* EventData.c in Sources */,
|
||||
43F7FD7D1927C31700CA4038 /* extension.c in Sources */,
|
||||
43F7FD7E1927C31700CA4038 /* Json.c in Sources */,
|
||||
43F7FD7F1927C31700CA4038 /* MeshAttachment.c in Sources */,
|
||||
43F7FD801927C31700CA4038 /* RegionAttachment.c in Sources */,
|
||||
43F7FD811927C31700CA4038 /* Skeleton.c in Sources */,
|
||||
43F7FD821927C31700CA4038 /* SkeletonBounds.c in Sources */,
|
||||
43F7FD831927C31700CA4038 /* SkeletonData.c in Sources */,
|
||||
43F7FD841927C31700CA4038 /* SkeletonJson.c in Sources */,
|
||||
43F7FD851927C31700CA4038 /* Skin.c in Sources */,
|
||||
43F7FD861927C31700CA4038 /* SkinnedMeshAttachment.c in Sources */,
|
||||
43F7FD871927C31700CA4038 /* Slot.c in Sources */,
|
||||
43F7FD881927C31700CA4038 /* SlotData.c in Sources */,
|
||||
43F7FDA71927C33C00CA4038 /* PolygonBatch.m in Sources */,
|
||||
43F7FDA81927C33C00CA4038 /* SkeletonAnimation.m in Sources */,
|
||||
43F7FDA91927C33C00CA4038 /* SkeletonRenderer.m in Sources */,
|
||||
43F7FDAC1927C34600CA4038 /* SpineboyExample.m in Sources */,
|
||||
43F7FDB51927D04200CA4038 /* GoblinsExample.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
43C32A13170B1295004A9460 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
43C32A14170B1295004A9460 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
43C32A15170B1295004A9460 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
43C32A16170B1295004A9460 /* English */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4319B6AA16FF9B2B00C1D7A9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
DEBUG,
|
||||
"COCOS2D_DEBUG=1",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4319B6AB16FF9B2B00C1D7A9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
NDEBUG,
|
||||
"NS_BLOCK_ASSERTIONS=1",
|
||||
);
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4319B6AD16FF9B2B00C1D7A9 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks\"",
|
||||
);
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "Resources-mac/Prefix.pch";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"src\"",
|
||||
"\"../../spine-c/include\"",
|
||||
"\"cocos2d/cocos2d\"/**",
|
||||
"\"cocos2d/external/kazmath/include\"",
|
||||
"\"cocos2d/external/ObjectAL\"/**",
|
||||
);
|
||||
INFOPLIST_FILE = "Resources-mac/Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glew/lib/Release/Win32\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glfw/lib-msvc100\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libGLEW/lib\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libglfw/lib\"",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib\"",
|
||||
);
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
|
||||
OTHER_LDFLAGS = (
|
||||
"-lz",
|
||||
"-lsqlite3",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4319B6AE16FF9B2B00C1D7A9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
COPY_PHASE_STRIP = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/System/Library/Frameworks\"",
|
||||
);
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "Resources-mac/Prefix.pch";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"\"src\"",
|
||||
"\"../../spine-c/include\"",
|
||||
"\"cocos2d/cocos2d\"/**",
|
||||
"\"cocos2d/external/kazmath/include\"",
|
||||
"\"cocos2d/external/ObjectAL\"/**",
|
||||
);
|
||||
INFOPLIST_FILE = "Resources-mac/Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glew/lib/Release/Win32\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/msvc/glfw/lib-msvc100\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libGLEW/lib\"",
|
||||
"\"$(SRCROOT)/cocos2d/external/Chipmunk/xcode/libglfw/lib\"",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib\"",
|
||||
);
|
||||
OTHER_CFLAGS = "";
|
||||
OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)";
|
||||
OTHER_LDFLAGS = (
|
||||
"-lz",
|
||||
"-lsqlite3",
|
||||
"-ObjC",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4319B50D16FF9B2600C1D7A9 /* Build configuration list for PBXProject "spine-cocos2d-iphone-osx" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4319B6AA16FF9B2B00C1D7A9 /* Debug */,
|
||||
4319B6AB16FF9B2B00C1D7A9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4319B6AC16FF9B2B00C1D7A9 /* Build configuration list for PBXNativeTarget "SpineExample" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4319B6AD16FF9B2B00C1D7A9 /* Debug */,
|
||||
4319B6AE16FF9B2B00C1D7A9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 4319B50A16FF9B2600C1D7A9 /* Project object */;
|
||||
}
|
||||
@ -2,6 +2,6 @@
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:spine-cocos2d-iphone-mac.xcodeproj">
|
||||
location = "self:spine-cocos2d-iphone-osx.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
#import <spine/spine-cocos2d-iphone.h>
|
||||
|
||||
@interface PolygonBatch : NSObject {
|
||||
@interface spPolygonBatch : NSObject {
|
||||
int _capacity;
|
||||
ccV2F_C4B_T2F* _vertices;
|
||||
int _verticesCount;
|
||||
|
||||
@ -33,10 +33,10 @@
|
||||
#import <spine/extension.h>
|
||||
#import "CCTexture_Private.h"
|
||||
|
||||
@implementation PolygonBatch
|
||||
@implementation spPolygonBatch
|
||||
|
||||
+ (id) createWithCapacity:(int)capacity {
|
||||
return [[(PolygonBatch*)[self alloc] initWithCapacity:capacity] autorelease];
|
||||
return [[(spPolygonBatch*)[self alloc] initWithCapacity:capacity] autorelease];
|
||||
}
|
||||
|
||||
- (id) initWithCapacity:(int)capacity {
|
||||
@ -57,7 +57,7 @@
|
||||
- (void) dealloc {
|
||||
FREE(_vertices);
|
||||
FREE(_triangles);
|
||||
[super dealloc];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) add:(CCTexture*)addTexture vertices:(const float*)addVertices uvs:(const float*)uvs
|
||||
@ -86,22 +86,21 @@
|
||||
}
|
||||
|
||||
- (void) flush {
|
||||
if (!_verticesCount) return;
|
||||
|
||||
ccGLBindTexture2D(_texture.name);
|
||||
if (!_verticesCount) return;
|
||||
|
||||
ccGLBindVAO(0);
|
||||
ccGLBindTexture2D(_texture.name);
|
||||
glEnableVertexAttribArray(kCCVertexAttrib_Position);
|
||||
glEnableVertexAttribArray(kCCVertexAttrib_Color);
|
||||
glEnableVertexAttribArray(kCCVertexAttrib_TexCoords);
|
||||
glVertexAttribPointer(kCCVertexAttrib_Position, 2, GL_FLOAT, GL_FALSE, sizeof(ccV2F_C4B_T2F), &_vertices[0].vertices);
|
||||
glVertexAttribPointer(kCCVertexAttrib_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ccV2F_C4B_T2F), &_vertices[0].colors);
|
||||
glVertexAttribPointer(kCCVertexAttrib_TexCoords, 2, GL_FLOAT, GL_FALSE, sizeof(ccV2F_C4B_T2F), &_vertices[0].texCoords);
|
||||
|
||||
glDrawElements(GL_TRIANGLES, _trianglesCount, GL_UNSIGNED_SHORT, _triangles);
|
||||
|
||||
|
||||
_verticesCount = 0;
|
||||
_trianglesCount = 0;
|
||||
|
||||
|
||||
CHECK_GL_ERROR_DEBUG();
|
||||
}
|
||||
|
||||
|
||||
@ -28,59 +28,60 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#define SPINE_SHORT_NAMES
|
||||
#import <spine/spine.h>
|
||||
#import <spine/SkeletonRenderer.h>
|
||||
#import "cocos2d.h"
|
||||
|
||||
@class SkeletonAnimation;
|
||||
|
||||
typedef void(^StartListener)(int trackIndex);
|
||||
typedef void(^EndListener)(int trackIndex);
|
||||
typedef void(^CompleteListener)(int trackIndex, int loopCount);
|
||||
typedef void(^EventListener)(int trackIndex, spEvent* event);
|
||||
typedef void(^spStartListener)(int trackIndex);
|
||||
typedef void(^spEndListener)(int trackIndex);
|
||||
typedef void(^spCompleteListener)(int trackIndex, int loopCount);
|
||||
typedef void(^spEventListener)(int trackIndex, spEvent* event);
|
||||
|
||||
/** Draws an animated skeleton, providing an AnimationState for applying one or more animations and queuing animations to be
|
||||
* played later. */
|
||||
@interface SkeletonAnimation : SkeletonRenderer {
|
||||
AnimationState* _state;
|
||||
spAnimationState* _state;
|
||||
bool _ownsAnimationStateData;
|
||||
float _timeScale;
|
||||
|
||||
StartListener _startListener;
|
||||
EndListener _endListener;
|
||||
CompleteListener _completeListener;
|
||||
EventListener _eventListener;
|
||||
spStartListener _startListener;
|
||||
spEndListener _endListener;
|
||||
spCompleteListener _completeListener;
|
||||
spEventListener _eventListener;
|
||||
}
|
||||
|
||||
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale;
|
||||
+ (id) skeletonWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
|
||||
|
||||
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale;
|
||||
- (id) initWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
|
||||
|
||||
- (void) setAnimationStateData:(AnimationStateData*)stateData;
|
||||
- (void) setAnimationStateData:(spAnimationStateData*)stateData;
|
||||
- (void) setMixFrom:(NSString*)fromAnimation to:(NSString*)toAnimation duration:(float)duration;
|
||||
|
||||
- (TrackEntry*) setAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop;
|
||||
- (TrackEntry*) addAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop afterDelay:(int)delay;
|
||||
- (TrackEntry*) getCurrentForTrack:(int)trackIndex;
|
||||
- (spTrackEntry*) setAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop;
|
||||
- (spTrackEntry*) addAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop afterDelay:(int)delay;
|
||||
- (spTrackEntry*) getCurrentForTrack:(int)trackIndex;
|
||||
- (void) clearTracks;
|
||||
- (void) clearTrack:(int)trackIndex;
|
||||
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onStart:(StartListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEnd:(EndListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onComplete:(CompleteListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEvent:(EventListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onStart:(spStartListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEnd:(spEndListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onComplete:(spCompleteListener)listener;
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEvent:(spEventListener)listener;
|
||||
|
||||
- (void) onAnimationStateEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount;
|
||||
- (void) onTrackEntryEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount;
|
||||
- (void) onAnimationStateEvent:(int)trackIndex type:(spEventType)type event:(spEvent*)event loopCount:(int)loopCount;
|
||||
- (void) onTrackEntryEvent:(int)trackIndex type:(spEventType)type event:(spEvent*)event loopCount:(int)loopCount;
|
||||
|
||||
@property (nonatomic, readonly) AnimationState* state;
|
||||
@property (nonatomic, copy) StartListener startListener;
|
||||
@property (nonatomic, copy) EndListener endListener;
|
||||
@property (nonatomic, copy) CompleteListener completeListener;
|
||||
@property (nonatomic, copy) EventListener eventListener;
|
||||
@property (nonatomic, readonly) spAnimationState* state;
|
||||
@property (nonatomic) float timeScale;
|
||||
@property (nonatomic, copy) spStartListener startListener;
|
||||
@property (nonatomic, copy) spEndListener endListener;
|
||||
@property (nonatomic, copy) spCompleteListener completeListener;
|
||||
@property (nonatomic, copy) spEventListener eventListener;
|
||||
|
||||
@end
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#import <spine/spine-cocos2d-iphone.h>
|
||||
#import <spine/extension.h>
|
||||
|
||||
static void animationCallback (AnimationState* state, int trackIndex, EventType type, Event* event, int loopCount) {
|
||||
static void animationCallback (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount) {
|
||||
[(SkeletonAnimation*)state->rendererObject onAnimationStateEvent:trackIndex type:type event:event loopCount:loopCount];
|
||||
}
|
||||
|
||||
@ -41,10 +41,10 @@ void trackEntryCallback (spAnimationState* state, int trackIndex, spEventType ty
|
||||
}
|
||||
|
||||
typedef struct _TrackEntryListeners {
|
||||
StartListener startListener;
|
||||
EndListener endListener;
|
||||
CompleteListener completeListener;
|
||||
EventListener eventListener;
|
||||
spStartListener startListener;
|
||||
spEndListener endListener;
|
||||
spCompleteListener completeListener;
|
||||
spEventListener eventListener;
|
||||
} _TrackEntryListeners;
|
||||
|
||||
static _TrackEntryListeners* getListeners (spTrackEntry* entry) {
|
||||
@ -76,16 +76,17 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
@implementation SkeletonAnimation
|
||||
|
||||
@synthesize state = _state;
|
||||
@synthesize timeScale = _timeScale;
|
||||
@synthesize startListener = _startListener;
|
||||
@synthesize endListener = _endListener;
|
||||
@synthesize completeListener = _completeListener;
|
||||
@synthesize eventListener = _eventListener;
|
||||
|
||||
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
+ (id) skeletonWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
return [[[self alloc] initWithData:skeletonData ownsSkeletonData:ownsSkeletonData] autorelease];
|
||||
}
|
||||
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale {
|
||||
return [[[self alloc] initWithFile:skeletonDataFile atlas:atlas scale:scale] autorelease];
|
||||
}
|
||||
|
||||
@ -95,7 +96,9 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
|
||||
- (void) initialize {
|
||||
_ownsAnimationStateData = true;
|
||||
_state = AnimationState_create(AnimationStateData_create(_skeleton->data));
|
||||
_timeScale = 1;
|
||||
|
||||
_state = spAnimationState_create(spAnimationStateData_create(_skeleton->data));
|
||||
_state->rendererObject = self;
|
||||
_state->listener = animationCallback;
|
||||
|
||||
@ -103,7 +106,7 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
stateInternal->disposeTrackEntry = disposeTrackEntry;
|
||||
}
|
||||
|
||||
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
- (id) initWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
self = [super initWithData:skeletonData ownsSkeletonData:ownsSkeletonData];
|
||||
if (!self) return nil;
|
||||
|
||||
@ -112,7 +115,7 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale {
|
||||
self = [super initWithFile:skeletonDataFile atlas:atlas scale:scale];
|
||||
if (!self) return nil;
|
||||
|
||||
@ -131,8 +134,8 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
if (_ownsAnimationStateData) AnimationStateData_dispose(_state->data);
|
||||
AnimationState_dispose(_state);
|
||||
if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data);
|
||||
spAnimationState_dispose(_state);
|
||||
|
||||
[_startListener release];
|
||||
[_endListener release];
|
||||
@ -143,61 +146,60 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
}
|
||||
|
||||
- (void) update:(CCTime)deltaTime {
|
||||
[super update:deltaTime];
|
||||
|
||||
deltaTime *= _timeScale;
|
||||
AnimationState_update(_state, deltaTime);
|
||||
AnimationState_apply(_state, _skeleton);
|
||||
Skeleton_updateWorldTransform(_skeleton);
|
||||
spSkeleton_update(_skeleton, deltaTime);
|
||||
spAnimationState_update(_state, deltaTime);
|
||||
spAnimationState_apply(_state, _skeleton);
|
||||
spSkeleton_updateWorldTransform(_skeleton);
|
||||
}
|
||||
|
||||
- (void) setAnimationStateData:(AnimationStateData*)stateData {
|
||||
- (void) setAnimationStateData:(spAnimationStateData*)stateData {
|
||||
NSAssert(stateData, @"stateData cannot be null.");
|
||||
|
||||
if (_ownsAnimationStateData) AnimationStateData_dispose(_state->data);
|
||||
AnimationState_dispose(_state);
|
||||
if (_ownsAnimationStateData) spAnimationStateData_dispose(_state->data);
|
||||
spAnimationState_dispose(_state);
|
||||
|
||||
_ownsAnimationStateData = false;
|
||||
_state = AnimationState_create(stateData);
|
||||
_state = spAnimationState_create(stateData);
|
||||
_state->rendererObject = self;
|
||||
_state->listener = animationCallback;
|
||||
}
|
||||
|
||||
- (void) setMixFrom:(NSString*)fromAnimation to:(NSString*)toAnimation duration:(float)duration {
|
||||
AnimationStateData_setMixByName(_state->data, [fromAnimation UTF8String], [toAnimation UTF8String], duration);
|
||||
spAnimationStateData_setMixByName(_state->data, [fromAnimation UTF8String], [toAnimation UTF8String], duration);
|
||||
}
|
||||
|
||||
- (TrackEntry*) setAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop {
|
||||
Animation* animation = SkeletonData_findAnimation(_skeleton->data, [name UTF8String]);
|
||||
- (spTrackEntry*) setAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop {
|
||||
spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, [name UTF8String]);
|
||||
if (!animation) {
|
||||
CCLOG(@"Spine: Animation not found: %@", name);
|
||||
return 0;
|
||||
}
|
||||
return AnimationState_setAnimation(_state, trackIndex, animation, loop);
|
||||
return spAnimationState_setAnimation(_state, trackIndex, animation, loop);
|
||||
}
|
||||
|
||||
- (TrackEntry*) addAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop afterDelay:(int)delay {
|
||||
Animation* animation = SkeletonData_findAnimation(_skeleton->data, [name UTF8String]);
|
||||
- (spTrackEntry*) addAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop afterDelay:(int)delay {
|
||||
spAnimation* animation = spSkeletonData_findAnimation(_skeleton->data, [name UTF8String]);
|
||||
if (!animation) {
|
||||
CCLOG(@"Spine: Animation not found: %@", name);
|
||||
return 0;
|
||||
}
|
||||
return AnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
|
||||
return spAnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
|
||||
}
|
||||
|
||||
- (TrackEntry*) getCurrentForTrack:(int)trackIndex {
|
||||
return AnimationState_getCurrent(_state, trackIndex);
|
||||
- (spTrackEntry*) getCurrentForTrack:(int)trackIndex {
|
||||
return spAnimationState_getCurrent(_state, trackIndex);
|
||||
}
|
||||
|
||||
- (void) clearTracks {
|
||||
AnimationState_clearTracks(_state);
|
||||
spAnimationState_clearTracks(_state);
|
||||
}
|
||||
|
||||
- (void) clearTrack:(int)trackIndex {
|
||||
AnimationState_clearTrack(_state, trackIndex);
|
||||
spAnimationState_clearTrack(_state, trackIndex);
|
||||
}
|
||||
|
||||
- (void) onAnimationStateEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount {
|
||||
- (void) onAnimationStateEvent:(int)trackIndex type:(spEventType)type event:(spEvent*)event loopCount:(int)loopCount {
|
||||
switch (type) {
|
||||
case SP_ANIMATION_START:
|
||||
if (_startListener) _startListener(trackIndex);
|
||||
@ -214,7 +216,7 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
}
|
||||
}
|
||||
|
||||
- (void) onTrackEntryEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount {
|
||||
- (void) onTrackEntryEvent:(int)trackIndex type:(spEventType)type event:(spEvent*)event loopCount:(int)loopCount {
|
||||
spTrackEntry* entry = spAnimationState_getCurrent(_state, trackIndex);
|
||||
if (!entry->rendererObject) return;
|
||||
_TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->rendererObject;
|
||||
@ -234,19 +236,19 @@ void disposeTrackEntry (spTrackEntry* entry) {
|
||||
}
|
||||
}
|
||||
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onStart:(StartListener)listener {
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onStart:(spStartListener)listener {
|
||||
getListeners(entry)->startListener = [listener copy];
|
||||
}
|
||||
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEnd:(EndListener)listener {
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEnd:(spEndListener)listener {
|
||||
getListeners(entry)->endListener = [listener copy];
|
||||
}
|
||||
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onComplete:(CompleteListener)listener {
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onComplete:(spCompleteListener)listener {
|
||||
getListeners(entry)->completeListener = [listener copy];
|
||||
}
|
||||
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEvent:(EventListener)listener {
|
||||
- (void) setListenerForEntry:(spTrackEntry*)entry onEvent:(spEventListener)listener {
|
||||
getListeners(entry)->eventListener = [listener copy];
|
||||
}
|
||||
|
||||
|
||||
@ -28,39 +28,37 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#define SPINE_SHORT_NAMES
|
||||
#import <spine/spine.h>
|
||||
#import "cocos2d.h"
|
||||
|
||||
@class PolygonBatch;
|
||||
@class spPolygonBatch;
|
||||
|
||||
/** Draws a skeleton. */
|
||||
@interface SkeletonRenderer : CCNode<CCBlendProtocol> {
|
||||
Skeleton* _skeleton;
|
||||
Bone* _rootBone;
|
||||
float _timeScale;
|
||||
spSkeleton* _skeleton;
|
||||
spBone* _rootBone;
|
||||
bool _debugSlots;
|
||||
bool _debugBones;
|
||||
bool _premultipliedAlpha;
|
||||
ccBlendFunc _blendFunc;
|
||||
|
||||
bool _ownsSkeletonData;
|
||||
Atlas* _atlas;
|
||||
PolygonBatch* batch;
|
||||
spAtlas* _atlas;
|
||||
spPolygonBatch* batch;
|
||||
float* worldVertices;
|
||||
}
|
||||
|
||||
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale;
|
||||
+ (id) skeletonWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale;
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
|
||||
|
||||
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale;
|
||||
- (id) initWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale;
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
|
||||
|
||||
- (CCTexture*) getTextureForRegion:(RegionAttachment*)attachment;
|
||||
- (CCTexture*) getTextureForMesh:(MeshAttachment*)attachment;
|
||||
- (CCTexture*) getTextureForSkinnedMesh:(SkinnedMeshAttachment*)attachment;
|
||||
- (CCTexture*) getTextureForRegion:(spRegionAttachment*)attachment;
|
||||
- (CCTexture*) getTextureForMesh:(spMeshAttachment*)attachment;
|
||||
- (CCTexture*) getTextureForSkinnedMesh:(spSkinnedMeshAttachment*)attachment;
|
||||
|
||||
// --- Convenience methods for common Skeleton_* functions.
|
||||
- (void) updateWorldTransform;
|
||||
@ -70,10 +68,10 @@
|
||||
- (void) setSlotsToSetupPose;
|
||||
|
||||
/* Returns 0 if the bone was not found. */
|
||||
- (Bone*) findBone:(NSString*)boneName;
|
||||
- (spBone*) findBone:(NSString*)boneName;
|
||||
|
||||
/* Returns 0 if the slot was not found. */
|
||||
- (Slot*) findSlot:(NSString*)slotName;
|
||||
- (spSlot*) findSlot:(NSString*)slotName;
|
||||
|
||||
/* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are
|
||||
* attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode
|
||||
@ -82,14 +80,13 @@
|
||||
- (bool) setSkin:(NSString*)skinName;
|
||||
|
||||
/* Returns 0 if the slot or attachment was not found. */
|
||||
- (Attachment*) getAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName;
|
||||
- (spAttachment*) getAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName;
|
||||
/* Returns false if the slot or attachment was not found. */
|
||||
- (bool) setAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName;
|
||||
|
||||
@property (nonatomic, readonly) Skeleton* skeleton;
|
||||
@property (nonatomic) float timeScale;
|
||||
@property (nonatomic, readonly) spSkeleton* skeleton;
|
||||
@property (nonatomic) bool debugSlots;
|
||||
@property (nonatomic) bool debugBones;
|
||||
@property (nonatomic) Bone* rootBone;
|
||||
@property (nonatomic) spBone* rootBone;
|
||||
|
||||
@end
|
||||
|
||||
@ -33,26 +33,26 @@
|
||||
#import <spine/extension.h>
|
||||
#import <spine/PolygonBatch.h>
|
||||
#import "CCNode_Private.h"
|
||||
#import "CCDrawingPrimitives.h"
|
||||
|
||||
static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
|
||||
@interface SkeletonRenderer (Private)
|
||||
- (void) initialize:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
- (void) initialize:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
|
||||
@end
|
||||
|
||||
@implementation SkeletonRenderer
|
||||
|
||||
@synthesize skeleton = _skeleton;
|
||||
@synthesize rootBone = _rootBone;
|
||||
@synthesize timeScale = _timeScale;
|
||||
@synthesize debugSlots = _debugSlots;
|
||||
@synthesize debugBones = _debugBones;
|
||||
|
||||
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
+ (id) skeletonWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
return [[[self alloc] initWithData:skeletonData ownsSkeletonData:ownsSkeletonData] autorelease];
|
||||
}
|
||||
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
|
||||
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale {
|
||||
return [[[self alloc] initWithFile:skeletonDataFile atlas:atlas scale:scale] autorelease];
|
||||
}
|
||||
|
||||
@ -60,16 +60,14 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
return [[[self alloc] initWithFile:skeletonDataFile atlasFile:atlasFile scale:scale] autorelease];
|
||||
}
|
||||
|
||||
- (void) initialize:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
- (void) initialize:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
_ownsSkeletonData = ownsSkeletonData;
|
||||
|
||||
_timeScale = 1;
|
||||
|
||||
worldVertices = MALLOC(float, 1000); // Max number of vertices per mesh.
|
||||
|
||||
batch = [[PolygonBatch createWithCapacity:2000] retain]; // Max number of vertices and triangles per batch.
|
||||
batch = [[spPolygonBatch createWithCapacity:2000] retain]; // Max number of vertices and triangles per batch.
|
||||
|
||||
_skeleton = Skeleton_create(skeletonData);
|
||||
_skeleton = spSkeleton_create(skeletonData);
|
||||
_rootBone = _skeleton->bones[0];
|
||||
|
||||
_blendFunc.src = GL_ONE;
|
||||
@ -79,7 +77,7 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
[self setShaderProgram:[[CCShaderCache sharedShaderCache] programForKey:kCCShader_PositionTextureColor]];
|
||||
}
|
||||
|
||||
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
- (id) initWithData:(spSkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
|
||||
NSAssert(skeletonData, @"skeletonData cannot be null.");
|
||||
|
||||
self = [super init];
|
||||
@ -90,15 +88,15 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
|
||||
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(spAtlas*)atlas scale:(float)scale {
|
||||
self = [super init];
|
||||
if (!self) return nil;
|
||||
|
||||
SkeletonJson* json = SkeletonJson_create(atlas);
|
||||
spSkeletonJson* json = spSkeletonJson_create(atlas);
|
||||
json->scale = scale == 0 ? (1 / [CCDirector sharedDirector].contentScaleFactor) : scale;
|
||||
SkeletonData* skeletonData = SkeletonJson_readSkeletonDataFile(json, [skeletonDataFile UTF8String]);
|
||||
spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, [skeletonDataFile UTF8String]);
|
||||
NSAssert(skeletonData, ([NSString stringWithFormat:@"Error reading skeleton data file: %@\nError: %s", skeletonDataFile, json->error]));
|
||||
SkeletonJson_dispose(json);
|
||||
spSkeletonJson_dispose(json);
|
||||
if (!skeletonData) return 0;
|
||||
|
||||
[self initialize:skeletonData ownsSkeletonData:YES];
|
||||
@ -110,15 +108,15 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
self = [super init];
|
||||
if (!self) return nil;
|
||||
|
||||
_atlas = Atlas_createFromFile([atlasFile UTF8String], 0);
|
||||
_atlas = spAtlas_createFromFile([atlasFile UTF8String], 0);
|
||||
NSAssert(_atlas, ([NSString stringWithFormat:@"Error reading atlas file: %@", atlasFile]));
|
||||
if (!_atlas) return 0;
|
||||
|
||||
SkeletonJson* json = SkeletonJson_create(_atlas);
|
||||
json->scale = scale == 0 ? (1 / [CCDirector sharedDirector].contentScaleFactor) : scale;
|
||||
SkeletonData* skeletonData = SkeletonJson_readSkeletonDataFile(json, [skeletonDataFile UTF8String]);
|
||||
spSkeletonJson* json = spSkeletonJson_create(_atlas);
|
||||
json->scale = scale / [CCDirector sharedDirector].contentScaleFactor;
|
||||
spSkeletonData* skeletonData = spSkeletonJson_readSkeletonDataFile(json, [skeletonDataFile UTF8String]);
|
||||
NSAssert(skeletonData, ([NSString stringWithFormat:@"Error reading skeleton data file: %@\nError: %s", skeletonDataFile, json->error]));
|
||||
SkeletonJson_dispose(json);
|
||||
spSkeletonJson_dispose(json);
|
||||
if (!skeletonData) return 0;
|
||||
|
||||
[self initialize:skeletonData ownsSkeletonData:YES];
|
||||
@ -127,18 +125,14 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
}
|
||||
|
||||
- (void) dealloc {
|
||||
if (_ownsSkeletonData) SkeletonData_dispose(_skeleton->data);
|
||||
if (_atlas) Atlas_dispose(_atlas);
|
||||
Skeleton_dispose(_skeleton);
|
||||
[batch release];
|
||||
if (_ownsSkeletonData) spSkeletonData_dispose(_skeleton->data);
|
||||
if (_atlas) spAtlas_dispose(_atlas);
|
||||
spSkeleton_dispose(_skeleton);
|
||||
[batch release];
|
||||
FREE(worldVertices);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) update:(CCTime)deltaTime {
|
||||
Skeleton_update(_skeleton, deltaTime * _timeScale);
|
||||
}
|
||||
|
||||
- (void) draw {
|
||||
CC_NODE_DRAW_SETUP();
|
||||
|
||||
@ -156,7 +150,7 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
int trianglesCount = 0;
|
||||
float r = 0, g = 0, b = 0, a = 0;
|
||||
for (int i = 0, n = _skeleton->slotCount; i < n; i++) {
|
||||
Slot* slot = _skeleton->drawOrder[i];
|
||||
spSlot* slot = _skeleton->drawOrder[i];
|
||||
if (!slot->attachment) continue;
|
||||
CCTexture *texture = 0;
|
||||
switch (slot->attachment->type) {
|
||||
@ -221,16 +215,15 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
}
|
||||
[batch flush];
|
||||
|
||||
/*
|
||||
if (_debugSlots) {
|
||||
// Slots.
|
||||
ccDrawColor4B(0, 0, 255, 255);
|
||||
glLineWidth(1);
|
||||
CGPoint points[4];
|
||||
for (int i = 0, n = _skeleton->slotCount; i < n; i++) {
|
||||
Slot* slot = _skeleton->drawOrder[i];
|
||||
if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue;
|
||||
RegionAttachment* attachment = (RegionAttachment*)slot->attachment;
|
||||
spSlot* slot = _skeleton->drawOrder[i];
|
||||
if (!slot->attachment || slot->attachment->type != SP_ATTACHMENT_REGION) continue;
|
||||
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment;
|
||||
spRegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, worldVertices);
|
||||
points[0] = ccp(worldVertices[0], worldVertices[1]);
|
||||
points[1] = ccp(worldVertices[2], worldVertices[3]);
|
||||
@ -244,7 +237,7 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
glLineWidth(2);
|
||||
ccDrawColor4B(255, 0, 0, 255);
|
||||
for (int i = 0, n = _skeleton->boneCount; i < n; i++) {
|
||||
Bone *bone = _skeleton->bones[i];
|
||||
spBone *bone = _skeleton->bones[i];
|
||||
float x = bone->data->length * bone->m00 + bone->worldX;
|
||||
float y = bone->data->length * bone->m10 + bone->worldY;
|
||||
ccDrawLine(ccp(bone->worldX, bone->worldY), ccp(x, y));
|
||||
@ -253,24 +246,23 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
ccPointSize(4);
|
||||
ccDrawColor4B(0, 0, 255, 255); // Root bone is blue.
|
||||
for (int i = 0, n = _skeleton->boneCount; i < n; i++) {
|
||||
Bone *bone = _skeleton->bones[i];
|
||||
spBone *bone = _skeleton->bones[i];
|
||||
ccDrawPoint(ccp(bone->worldX, bone->worldY));
|
||||
if (i == 0) ccDrawColor4B(0, 255, 0, 255);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
- (CCTexture*) getTextureForRegion:(RegionAttachment*)attachment {
|
||||
return (CCTexture*)((AtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
- (CCTexture*) getTextureForRegion:(spRegionAttachment*)attachment {
|
||||
return (CCTexture*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
}
|
||||
|
||||
- (CCTexture*) getTextureForMesh:(MeshAttachment*)attachment {
|
||||
return (CCTexture*)((AtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
- (CCTexture*) getTextureForMesh:(spMeshAttachment*)attachment {
|
||||
return (CCTexture*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
}
|
||||
|
||||
- (CCTexture*) getTextureForSkinnedMesh:(SkinnedMeshAttachment*)attachment {
|
||||
return (CCTexture*)((AtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
- (CCTexture*) getTextureForSkinnedMesh:(spSkinnedMeshAttachment*)attachment {
|
||||
return (CCTexture*)((spAtlasRegion*)attachment->rendererObject)->page->rendererObject;
|
||||
}
|
||||
|
||||
- (CGRect) boundingBox {
|
||||
@ -279,26 +271,26 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
float scaleY = self.scaleY;
|
||||
float vertices[8];
|
||||
for (int i = 0; i < _skeleton->slotCount; ++i) {
|
||||
Slot* slot = _skeleton->slots[i];
|
||||
if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue;
|
||||
RegionAttachment* attachment = (RegionAttachment*)slot->attachment;
|
||||
RegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices);
|
||||
minX = fmin(minX, vertices[VERTEX_X1] * scaleX);
|
||||
minY = fmin(minY, vertices[VERTEX_Y1] * scaleY);
|
||||
maxX = fmax(maxX, vertices[VERTEX_X1] * scaleX);
|
||||
maxY = fmax(maxY, vertices[VERTEX_Y1] * scaleY);
|
||||
minX = fmin(minX, vertices[VERTEX_X4] * scaleX);
|
||||
minY = fmin(minY, vertices[VERTEX_Y4] * scaleY);
|
||||
maxX = fmax(maxX, vertices[VERTEX_X4] * scaleX);
|
||||
maxY = fmax(maxY, vertices[VERTEX_Y4] * scaleY);
|
||||
minX = fmin(minX, vertices[VERTEX_X2] * scaleX);
|
||||
minY = fmin(minY, vertices[VERTEX_Y2] * scaleY);
|
||||
maxX = fmax(maxX, vertices[VERTEX_X2] * scaleX);
|
||||
maxY = fmax(maxY, vertices[VERTEX_Y2] * scaleY);
|
||||
minX = fmin(minX, vertices[VERTEX_X3] * scaleX);
|
||||
minY = fmin(minY, vertices[VERTEX_Y3] * scaleY);
|
||||
maxX = fmax(maxX, vertices[VERTEX_X3] * scaleX);
|
||||
maxY = fmax(maxY, vertices[VERTEX_Y3] * scaleY);
|
||||
spSlot* slot = _skeleton->slots[i];
|
||||
if (!slot->attachment || slot->attachment->type != SP_ATTACHMENT_REGION) continue;
|
||||
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment;
|
||||
spRegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, vertices);
|
||||
minX = fmin(minX, vertices[SP_VERTEX_X1] * scaleX);
|
||||
minY = fmin(minY, vertices[SP_VERTEX_Y1] * scaleY);
|
||||
maxX = fmax(maxX, vertices[SP_VERTEX_X1] * scaleX);
|
||||
maxY = fmax(maxY, vertices[SP_VERTEX_Y1] * scaleY);
|
||||
minX = fmin(minX, vertices[SP_VERTEX_X4] * scaleX);
|
||||
minY = fmin(minY, vertices[SP_VERTEX_Y4] * scaleY);
|
||||
maxX = fmax(maxX, vertices[SP_VERTEX_X4] * scaleX);
|
||||
maxY = fmax(maxY, vertices[SP_VERTEX_Y4] * scaleY);
|
||||
minX = fmin(minX, vertices[SP_VERTEX_X2] * scaleX);
|
||||
minY = fmin(minY, vertices[SP_VERTEX_Y2] * scaleY);
|
||||
maxX = fmax(maxX, vertices[SP_VERTEX_X2] * scaleX);
|
||||
maxY = fmax(maxY, vertices[SP_VERTEX_Y2] * scaleY);
|
||||
minX = fmin(minX, vertices[SP_VERTEX_X3] * scaleX);
|
||||
minY = fmin(minY, vertices[SP_VERTEX_Y3] * scaleY);
|
||||
maxX = fmax(maxX, vertices[SP_VERTEX_X3] * scaleX);
|
||||
maxY = fmax(maxY, vertices[SP_VERTEX_Y3] * scaleY);
|
||||
}
|
||||
minX = self.position.x + minX;
|
||||
minY = self.position.y + minY;
|
||||
@ -310,36 +302,36 @@ static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
|
||||
// --- Convenience methods for Skeleton_* functions.
|
||||
|
||||
- (void) updateWorldTransform {
|
||||
Skeleton_updateWorldTransform(_skeleton);
|
||||
spSkeleton_updateWorldTransform(_skeleton);
|
||||
}
|
||||
|
||||
- (void) setToSetupPose {
|
||||
Skeleton_setToSetupPose(_skeleton);
|
||||
spSkeleton_setToSetupPose(_skeleton);
|
||||
}
|
||||
- (void) setBonesToSetupPose {
|
||||
Skeleton_setBonesToSetupPose(_skeleton);
|
||||
spSkeleton_setBonesToSetupPose(_skeleton);
|
||||
}
|
||||
- (void) setSlotsToSetupPose {
|
||||
Skeleton_setSlotsToSetupPose(_skeleton);
|
||||
spSkeleton_setSlotsToSetupPose(_skeleton);
|
||||
}
|
||||
|
||||
- (Bone*) findBone:(NSString*)boneName {
|
||||
return Skeleton_findBone(_skeleton, [boneName UTF8String]);
|
||||
- (spBone*) findBone:(NSString*)boneName {
|
||||
return spSkeleton_findBone(_skeleton, [boneName UTF8String]);
|
||||
}
|
||||
|
||||
- (Slot*) findSlot:(NSString*)slotName {
|
||||
return Skeleton_findSlot(_skeleton, [slotName UTF8String]);
|
||||
- (spSlot*) findSlot:(NSString*)slotName {
|
||||
return spSkeleton_findSlot(_skeleton, [slotName UTF8String]);
|
||||
}
|
||||
|
||||
- (bool) setSkin:(NSString*)skinName {
|
||||
return (bool)Skeleton_setSkinByName(_skeleton, skinName ? [skinName UTF8String] : 0);
|
||||
return (bool)spSkeleton_setSkinByName(_skeleton, skinName ? [skinName UTF8String] : 0);
|
||||
}
|
||||
|
||||
- (Attachment*) getAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName {
|
||||
return Skeleton_getAttachmentForSlotName(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
|
||||
- (spAttachment*) getAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName {
|
||||
return spSkeleton_getAttachmentForSlotName(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
|
||||
}
|
||||
- (bool) setAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName {
|
||||
return (bool)Skeleton_setAttachment(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
|
||||
return (bool)spSkeleton_setAttachment(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
|
||||
}
|
||||
|
||||
// --- CCBlendProtocol
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*****************************************************************************/
|
||||
|
||||
#define SPINE_SHORT_NAMES
|
||||
#import <spine/spine.h>
|
||||
#import "cocos2d.h"
|
||||
#import <spine/SkeletonRenderer.h>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#import <spine/spine-cocos2d-iphone.h>
|
||||
#import <spine/extension.h>
|
||||
|
||||
void _AtlasPage_createTexture (AtlasPage* self, const char* path) {
|
||||
void _spAtlasPage_createTexture (spAtlasPage* self, const char* path) {
|
||||
CCTexture* texture = [[CCTexture textureWithFile:@(path)] retain];
|
||||
self->rendererObject = texture;
|
||||
CGSize size = texture.contentSizeInPixels;
|
||||
@ -39,10 +39,10 @@ void _AtlasPage_createTexture (AtlasPage* self, const char* path) {
|
||||
self->height = size.height;
|
||||
}
|
||||
|
||||
void _AtlasPage_disposeTexture (AtlasPage* self) {
|
||||
void _spAtlasPage_disposeTexture (spAtlasPage* self) {
|
||||
[(CCTexture*)self->rendererObject release];
|
||||
}
|
||||
|
||||
char* _Util_readFile (const char* path, int* length) {
|
||||
char* _spUtil_readFile (const char* path, int* length) {
|
||||
return _readFile([[[CCFileUtils sharedFileUtils] fullPathForFilename:@(path)] UTF8String], length);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user