Spine runtime for cocos2d-iphone v3.0 >>BROKEN<< WIP, not ready for use.

This commit is contained in:
NathanSweet 2014-05-18 21:53:44 +02:00
parent a62b1ff0f2
commit 46f24bbe6a
47 changed files with 8597 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# spine-cocos2d-iphone v3.0
The spine-cocos2d-iphone runtime provides functionality to load, manipulate and render [Spine](http://esotericsoftware.com) skeletal animation data using [cocos2d-iphone](http://www.cocos2d-iphone.org/). spine-cocos2d-iphone is based on [spine-c](https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-c).
## Setup
1. Download the Spine Runtimes source using [git](https://help.github.com/articles/set-up-git) or by downloading it [as a zip](https://github.com/EsotericSoftware/spine-runtimes/archive/master.zip).
1. Place the contents of a cocos2d version 3.0.x distribution into the `spine-cocos2d-iphone/3.0/cocos2d` directory.
1. Open the XCode project file for iOS or Mac from the `spine-cocos2d-iphone/3.0` directory.
Alternatively, the contents of the `spine-c/src`, `spine-c/include` and `spine-cocos2d-iphone/3.0/src` directories can be copied into your project. Be sure your header search path will find the contents of the `spine-c/include` and `spine-cocos2d-iphone/3.0/src` directories. Note that the includes use `spine/Xxx.h`, so the `spine` directory cannot be omitted when copying the files.
## Examples
[Spineboy](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3.0/example/SpineboyExample.cpp)
[Golbins](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-cocos2d-iphone/3.0/example/GoblinsExample.cpp)
## Links
[podspec](https://github.com/ldomaradzki/spine-runtimes/blob/master/Spine-Cocos2d-iPhone.podspec) (maintained externally)

View File

@ -0,0 +1,7 @@
#import <UIKit/UIKit.h>
#import "cocos2d.h"
// Added only for iOS 6 support
@interface AppController : CCAppDelegate
@end

View File

@ -0,0 +1,34 @@
#import "cocos2d.h"
#import "AppDelegate.h"
#import "SpineboyExample.h"
@implementation AppController
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
CCFileUtils* sharedFileUtils = [CCFileUtils sharedFileUtils];
sharedFileUtils.searchPath =
[NSArray arrayWithObjects:
[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Images"],
[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Fonts"],
[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Resources-shared"],
[[NSBundle mainBundle] resourcePath],
nil];
[self setupCocos2dWithOptions:@{
CCSetupDepthFormat: @GL_DEPTH24_STENCIL8,
// CCSetupTabletScale2X: @YES,
// CCSetupScreenMode: CCScreenModeFixed,
// CCSetupScreenOrientation: CCScreenOrientationPortrait,
CCSetupShowDebugStats: @YES,
}];
return YES;
}
- (CCScene*) startScene {
return [SpineboyExample scene];
}
@end

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>Icon@2x.png</string>
<string>Icon-72.png</string>
<string>Icon-Small-50.png</string>
<string>Icon-Small.png</string>
<string>Icon-Small@2x.png</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<dict>
<key>accelerometer</key>
<true/>
<key>opengles-2</key>
<true/>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -0,0 +1,11 @@
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iPhone SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -0,0 +1,9 @@
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
int retVal = UIApplicationMain(argc, argv, nil, @"AppController");
return retVal;
}
}

View File

@ -0,0 +1,14 @@
#import "cocos2d.h"
@interface spine_cocos2d_iphoneAppDelegate : NSObject <NSApplicationDelegate> {
NSWindow *window_;
CCGLView *glView_;
}
@property IBOutlet NSWindow *window;
@property IBOutlet CCGLView *glView;
- (IBAction)toggleFullScreen:(id)sender;
@end

View File

@ -0,0 +1,36 @@
#import "AppDelegate.h"
#import "SpineboyExample.h"
@implementation spine_cocos2d_iphoneAppDelegate
@synthesize window=window_, glView=glView_;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
CCDirectorMac *director = (CCDirectorMac*)[CCDirector sharedDirector];
[director setDisplayStats:YES];
[director setView:glView_];
[director setResizeMode:kCCDirectorResize_AutoScale];
[window_ setAcceptsMouseMovedEvents:NO];
[window_ center];
[director runWithScene:[SpineboyExample scene]];
}
- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *) theApplication {
return YES;
}
- (void)dealloc {
[[CCDirector sharedDirector] end];
}
#pragma mark AppDelegate - IBActions
- (IBAction)toggleFullScreen: (id)sender {
CCDirectorMac *director = (CCDirectorMac*) [CCDirector sharedDirector];
[director setFullScreen:![director isFullScreen]];
}
@end

View File

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

View File

@ -0,0 +1,896 @@
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1060</int>
<string key="IBDocument.SystemVersion">10K549</string>
<string key="IBDocument.InterfaceBuilderVersion">1938</string>
<string key="IBDocument.AppKitVersion">1038.36</string>
<string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">1938</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSOpenGLView</string>
<string>NSWindowTemplate</string>
<string>NSView</string>
<string>NSMenu</string>
<string>NSMenuItem</string>
<string>NSCustomObject</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1021">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSCustomObject" id="1014">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1050">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSMenu" id="649796088">
<string key="NSTitle">AMainMenu</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="694149608">
<reference key="NSMenu" ref="649796088"/>
<string key="NSTitle">spine-cocos2d-iphone</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<object class="NSCustomResource" key="NSOnImage" id="35465992">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuCheckmark</string>
</object>
<object class="NSCustomResource" key="NSMixedImage" id="502551668">
<string key="NSClassName">NSImage</string>
<string key="NSResourceName">NSMenuMixedState</string>
</object>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="110575045">
<string key="NSTitle">spine-cocos2d-iphone</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238522557">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">About spine-cocos2d-iphone</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="304266470">
<reference key="NSMenu" ref="110575045"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="609285721">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Preferences…</string>
<string key="NSKeyEquiv">,</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="481834944">
<reference key="NSMenu" ref="110575045"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="1046388886">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Services</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="752062318">
<string key="NSTitle">Services</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<string key="NSName">_NSServicesMenu</string>
</object>
</object>
<object class="NSMenuItem" id="646227648">
<reference key="NSMenu" ref="110575045"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="755159360">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Hide spine-cocos2d-iphone</string>
<string key="NSKeyEquiv">h</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="342932134">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Hide Others</string>
<string key="NSKeyEquiv">h</string>
<int key="NSKeyEquivModMask">1572864</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="908899353">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Show All</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="1056857174">
<reference key="NSMenu" ref="110575045"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="632727374">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Quit spine-cocos2d-iphone</string>
<string key="NSKeyEquiv">q</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<string key="NSName">_NSAppleMenu</string>
</object>
</object>
<object class="NSMenuItem" id="586577488">
<reference key="NSMenu" ref="649796088"/>
<string key="NSTitle">View</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="466310130">
<string key="NSTitle">View</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="593943139">
<reference key="NSMenu" ref="466310130"/>
<string key="NSTitle">Toggle Full Screen</string>
<string key="NSKeyEquiv">f</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
</object>
</object>
<object class="NSMenuItem" id="713487014">
<reference key="NSMenu" ref="649796088"/>
<string key="NSTitle">Window</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="835318025">
<string key="NSTitle">Window</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="1011231497">
<reference key="NSMenu" ref="835318025"/>
<string key="NSTitle">Minimize</string>
<string key="NSKeyEquiv">m</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="575023229">
<reference key="NSMenu" ref="835318025"/>
<string key="NSTitle">Zoom</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="299356726">
<reference key="NSMenu" ref="835318025"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="625202149">
<reference key="NSMenu" ref="835318025"/>
<string key="NSTitle">Bring All to Front</string>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<string key="NSName">_NSWindowsMenu</string>
</object>
</object>
<object class="NSMenuItem" id="448692316">
<reference key="NSMenu" ref="649796088"/>
<string key="NSTitle">Help</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
<string key="NSAction">submenuAction:</string>
<object class="NSMenu" key="NSSubmenu" id="992780483">
<string key="NSTitle">Help</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="105068016">
<reference key="NSMenu" ref="992780483"/>
<string key="NSTitle">spine-cocos2d-iphone Help</string>
<string key="NSKeyEquiv">?</string>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<string key="NSName">_NSHelpMenu</string>
</object>
</object>
</object>
<string key="NSName">_NSMainMenu</string>
</object>
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{335, 435}, {580, 416}}</string>
<int key="NSWTFlags">1685585920</int>
<string key="NSWindowTitle">spine-cocos2d-iphone</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<object class="NSView" key="NSWindowView" id="439893737">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSOpenGLView" id="335206536">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">1298</int>
<object class="NSPSMatrix" key="NSDrawMatrix"/>
<string key="NSFrame">{{0, 20}, {580, 396}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<int key="NSViewLayerContentsRedrawPolicy">2</int>
<object class="NSOpenGLPixelFormat" key="NSPixelFormat">
<object class="NSMutableData" key="NSPixelAttributes">
<bytes key="NS.bytes">AAAABQAAAGAAAAAIAAAADwAAAAsAAAAIAAAAAA</bytes>
</object>
</object>
</object>
</object>
<string key="NSFrameSize">{580, 416}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="335206536"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1680, 1028}}</string>
<string key="NSMaxSize">{1e+13, 1e+13}</string>
</object>
<object class="NSCustomObject" id="976324537">
<string key="NSClassName">spine_cocos2d_iphoneAppDelegate</string>
</object>
<object class="NSCustomObject" id="755631768">
<string key="NSClassName">NSFontManager</string>
</object>
<object class="NSMenuItem" id="313989180">
<string key="NSTitle">Item</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">terminate:</string>
<reference key="source" ref="1050"/>
<reference key="destination" ref="632727374"/>
</object>
<int key="connectionID">449</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">orderFrontStandardAboutPanel:</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">142</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1021"/>
<reference key="destination" ref="976324537"/>
</object>
<int key="connectionID">495</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performMiniaturize:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="1011231497"/>
</object>
<int key="connectionID">37</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">arrangeInFront:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="625202149"/>
</object>
<int key="connectionID">39</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">performZoom:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="575023229"/>
</object>
<int key="connectionID">240</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">hide:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="755159360"/>
</object>
<int key="connectionID">367</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">hideOtherApplications:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="342932134"/>
</object>
<int key="connectionID">368</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">unhideAllApplications:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="908899353"/>
</object>
<int key="connectionID">370</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">showHelp:</string>
<reference key="source" ref="1014"/>
<reference key="destination" ref="105068016"/>
</object>
<int key="connectionID">493</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="972006081"/>
</object>
<int key="connectionID">536</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">glView</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="335206536"/>
</object>
<int key="connectionID">537</int>
</object>
<object class="IBConnectionRecord">
<object class="IBActionConnection" key="connection">
<string key="label">toggleFullScreen:</string>
<reference key="source" ref="976324537"/>
<reference key="destination" ref="593943139"/>
</object>
<int key="connectionID">541</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1048"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1021"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1014"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1050"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">29</int>
<reference key="object" ref="649796088"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="713487014"/>
<reference ref="694149608"/>
<reference ref="586577488"/>
<reference ref="448692316"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">19</int>
<reference key="object" ref="713487014"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="835318025"/>
</object>
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">56</int>
<reference key="object" ref="694149608"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="110575045"/>
</object>
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">57</int>
<reference key="object" ref="110575045"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="238522557"/>
<reference ref="755159360"/>
<reference ref="908899353"/>
<reference ref="632727374"/>
<reference ref="646227648"/>
<reference ref="609285721"/>
<reference ref="481834944"/>
<reference ref="304266470"/>
<reference ref="1046388886"/>
<reference ref="1056857174"/>
<reference ref="342932134"/>
</object>
<reference key="parent" ref="694149608"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="238522557"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">134</int>
<reference key="object" ref="755159360"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">150</int>
<reference key="object" ref="908899353"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">136</int>
<reference key="object" ref="632727374"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">144</int>
<reference key="object" ref="646227648"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">129</int>
<reference key="object" ref="609285721"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">143</int>
<reference key="object" ref="481834944"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">236</int>
<reference key="object" ref="304266470"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">131</int>
<reference key="object" ref="1046388886"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="752062318"/>
</object>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">149</int>
<reference key="object" ref="1056857174"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">145</int>
<reference key="object" ref="342932134"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">130</int>
<reference key="object" ref="752062318"/>
<reference key="parent" ref="1046388886"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">24</int>
<reference key="object" ref="835318025"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="299356726"/>
<reference ref="625202149"/>
<reference ref="575023229"/>
<reference ref="1011231497"/>
</object>
<reference key="parent" ref="713487014"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">92</int>
<reference key="object" ref="299356726"/>
<reference key="parent" ref="835318025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="625202149"/>
<reference key="parent" ref="835318025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">239</int>
<reference key="object" ref="575023229"/>
<reference key="parent" ref="835318025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">23</int>
<reference key="object" ref="1011231497"/>
<reference key="parent" ref="835318025"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">295</int>
<reference key="object" ref="586577488"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="466310130"/>
</object>
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">296</int>
<reference key="object" ref="466310130"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="593943139"/>
</object>
<reference key="parent" ref="586577488"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">371</int>
<reference key="object" ref="972006081"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="439893737"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">372</int>
<reference key="object" ref="439893737"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="335206536"/>
</object>
<reference key="parent" ref="972006081"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">420</int>
<reference key="object" ref="755631768"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">490</int>
<reference key="object" ref="448692316"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="992780483"/>
</object>
<reference key="parent" ref="649796088"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">491</int>
<reference key="object" ref="992780483"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="105068016"/>
</object>
<reference key="parent" ref="448692316"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">492</int>
<reference key="object" ref="105068016"/>
<reference key="parent" ref="992780483"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">494</int>
<reference key="object" ref="976324537"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">533</int>
<reference key="object" ref="335206536"/>
<reference key="parent" ref="439893737"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">538</int>
<reference key="object" ref="313989180"/>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">540</int>
<reference key="object" ref="593943139"/>
<reference key="parent" ref="466310130"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>129.IBPluginDependency</string>
<string>130.IBPluginDependency</string>
<string>131.IBPluginDependency</string>
<string>134.IBPluginDependency</string>
<string>136.IBPluginDependency</string>
<string>143.IBPluginDependency</string>
<string>144.IBPluginDependency</string>
<string>145.IBPluginDependency</string>
<string>149.IBPluginDependency</string>
<string>150.IBPluginDependency</string>
<string>19.IBPluginDependency</string>
<string>23.IBPluginDependency</string>
<string>236.IBPluginDependency</string>
<string>239.IBPluginDependency</string>
<string>24.IBPluginDependency</string>
<string>29.IBPluginDependency</string>
<string>295.IBPluginDependency</string>
<string>296.IBPluginDependency</string>
<string>371.IBPluginDependency</string>
<string>371.IBWindowTemplateEditedContentRect</string>
<string>371.NSWindowTemplate.visibleAtLaunch</string>
<string>372.IBPluginDependency</string>
<string>420.IBPluginDependency</string>
<string>490.IBPluginDependency</string>
<string>491.IBPluginDependency</string>
<string>492.IBPluginDependency</string>
<string>494.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>533.CustomClassName</string>
<string>533.IBPluginDependency</string>
<string>538.IBPluginDependency</string>
<string>540.IBPluginDependency</string>
<string>56.IBPluginDependency</string>
<string>57.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>92.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{395, 107}, {580, 416}}</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>CCGLView</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">541</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">MacGLView</string>
<string key="superclassName">NSOpenGLView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MacGLView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">spine_cocos2d_iphoneAppDelegate</string>
<string key="superclassName">NSObject</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">toggleFullScreen:</string>
<string key="NS.object.0">id</string>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<string key="NS.key.0">toggleFullScreen:</string>
<object class="IBActionInfo" key="NS.object.0">
<string key="name">toggleFullScreen:</string>
<string key="candidateClassName">id</string>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>glView</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>MacGLView</string>
<string>NSWindow</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>glView</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">glView</string>
<string key="candidateClassName">MacGLView</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">window</string>
<string key="candidateClassName">NSWindow</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/spine_cocos2d_iphoneAppDelegate.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSMenuCheckmark</string>
<string>NSMenuMixedState</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{9, 8}</string>
<string>{7, 2}</string>
</object>
</object>
</data>
</archive>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon</string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -0,0 +1,4 @@
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

Binary file not shown.

View File

@ -0,0 +1,8 @@
#import <Cocoa/Cocoa.h>
#import "cocos2d.h"
int main(int argc, char *argv[]) {
[CCGLView load_];
return NSApplicationMain(argc, (const char **) argv);
}

View File

@ -0,0 +1,292 @@
goblins-ffd.png
format: RGBA8888
filter: Linear,Linear
repeat: none
dagger
rotate: true
xy: 372, 100
size: 26, 108
orig: 26, 108
offset: 0, 0
index: -1
goblin/eyes-closed
rotate: false
xy: 2, 7
size: 34, 12
orig: 34, 12
offset: 0, 0
index: -1
goblin/head
rotate: false
xy: 107, 36
size: 103, 66
orig: 103, 66
offset: 0, 0
index: -1
goblin/left-arm
rotate: false
xy: 901, 56
size: 37, 35
orig: 37, 35
offset: 0, 0
index: -1
goblin/left-foot
rotate: false
xy: 929, 95
size: 65, 31
orig: 65, 31
offset: 0, 0
index: -1
goblin/left-hand
rotate: false
xy: 452, 2
size: 36, 41
orig: 36, 41
offset: 0, 0
index: -1
goblin/left-lower-leg
rotate: true
xy: 713, 93
size: 33, 70
orig: 33, 70
offset: 0, 0
index: -1
goblin/left-shoulder
rotate: false
xy: 610, 44
size: 29, 44
orig: 29, 44
offset: 0, 0
index: -1
goblin/left-upper-leg
rotate: true
xy: 638, 93
size: 33, 73
orig: 33, 73
offset: 0, 0
index: -1
goblin/neck
rotate: false
xy: 490, 2
size: 36, 41
orig: 36, 41
offset: 0, 0
index: -1
goblin/pelvis
rotate: false
xy: 482, 45
size: 62, 43
orig: 62, 43
offset: 0, 0
index: -1
goblin/right-arm
rotate: true
xy: 690, 2
size: 23, 50
orig: 23, 50
offset: 0, 0
index: -1
goblin/right-foot
rotate: false
xy: 771, 58
size: 63, 33
orig: 63, 33
offset: 0, 0
index: -1
goblin/right-hand
rotate: false
xy: 940, 56
size: 36, 37
orig: 36, 37
offset: 0, 0
index: -1
goblin/right-lower-leg
rotate: true
xy: 482, 90
size: 36, 76
orig: 36, 76
offset: 0, 0
index: -1
goblin/right-shoulder
rotate: true
xy: 602, 3
size: 39, 45
orig: 39, 45
offset: 0, 0
index: -1
goblin/right-upper-leg
rotate: true
xy: 641, 57
size: 34, 63
orig: 34, 63
offset: 0, 0
index: -1
goblin/torso
rotate: true
xy: 212, 34
size: 68, 96
orig: 68, 96
offset: 0, 0
index: -1
goblin/undie-straps
rotate: false
xy: 380, 5
size: 55, 19
orig: 55, 19
offset: 0, 0
index: -1
goblin/undies
rotate: false
xy: 174, 5
size: 36, 29
orig: 36, 29
offset: 0, 0
index: -1
goblingirl/eyes-closed
rotate: false
xy: 269, 11
size: 37, 21
orig: 37, 21
offset: 0, 0
index: -1
goblingirl/head
rotate: false
xy: 2, 21
size: 103, 81
orig: 103, 81
offset: 0, 0
index: -1
goblingirl/left-arm
rotate: true
xy: 978, 56
size: 37, 35
orig: 37, 35
offset: 0, 0
index: -1
goblingirl/left-foot
rotate: false
xy: 107, 3
size: 65, 31
orig: 65, 31
offset: 0, 0
index: -1
goblingirl/left-hand
rotate: false
xy: 565, 2
size: 35, 40
orig: 35, 40
offset: 0, 0
index: -1
goblingirl/left-lower-leg
rotate: true
xy: 785, 93
size: 33, 70
orig: 33, 70
offset: 0, 0
index: -1
goblingirl/left-shoulder
rotate: true
xy: 690, 27
size: 28, 46
orig: 28, 46
offset: 0, 0
index: -1
goblingirl/left-upper-leg
rotate: true
xy: 857, 93
size: 33, 70
orig: 33, 70
offset: 0, 0
index: -1
goblingirl/neck
rotate: false
xy: 528, 2
size: 35, 41
orig: 35, 41
offset: 0, 0
index: -1
goblingirl/pelvis
rotate: false
xy: 546, 45
size: 62, 43
orig: 62, 43
offset: 0, 0
index: -1
goblingirl/right-arm
rotate: false
xy: 452, 48
size: 28, 50
orig: 28, 50
offset: 0, 0
index: -1
goblingirl/right-foot
rotate: false
xy: 836, 58
size: 63, 33
orig: 63, 33
offset: 0, 0
index: -1
goblingirl/right-hand
rotate: true
xy: 771, 20
size: 36, 37
orig: 36, 37
offset: 0, 0
index: -1
goblingirl/right-lower-leg
rotate: true
xy: 560, 90
size: 36, 76
orig: 36, 76
offset: 0, 0
index: -1
goblingirl/right-shoulder
rotate: false
xy: 649, 10
size: 39, 45
orig: 39, 45
offset: 0, 0
index: -1
goblingirl/right-upper-leg
rotate: true
xy: 706, 57
size: 34, 63
orig: 34, 63
offset: 0, 0
index: -1
goblingirl/torso
rotate: false
xy: 310, 2
size: 68, 96
orig: 68, 96
offset: 0, 0
index: -1
goblingirl/undie-straps
rotate: false
xy: 212, 13
size: 55, 19
orig: 55, 19
offset: 0, 0
index: -1
goblingirl/undies
rotate: false
xy: 810, 27
size: 36, 29
orig: 36, 29
offset: 0, 0
index: -1
shield
rotate: false
xy: 380, 26
size: 70, 72
orig: 70, 72
offset: 0, 0
index: -1
spear
rotate: true
xy: 2, 104
size: 22, 368
orig: 22, 368
offset: 0, 0
index: -1

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 KiB

View File

@ -0,0 +1,194 @@
spineboy.png
format: RGBA8888
filter: Linear,Linear
repeat: none
eye_indifferent
rotate: true
xy: 389, 5
size: 56, 53
orig: 56, 53
offset: 0, 0
index: -1
eye_surprised
rotate: false
xy: 580, 34
size: 56, 53
orig: 56, 53
offset: 0, 0
index: -1
front_bracer
rotate: false
xy: 732, 85
size: 35, 48
orig: 35, 48
offset: 0, 0
index: -1
front_fist_closed
rotate: false
xy: 556, 91
size: 45, 49
orig: 45, 49
offset: 0, 0
index: -1
front_fist_open
rotate: false
xy: 668, 32
size: 52, 52
orig: 52, 52
offset: 0, 0
index: -1
front_foot
rotate: false
xy: 924, 201
size: 76, 41
orig: 76, 41
offset: 0, 0
index: -1
front_foot_bend1
rotate: false
xy: 845, 200
size: 77, 42
orig: 77, 42
offset: 0, 0
index: -1
front_foot_bend2
rotate: false
xy: 778, 186
size: 65, 56
orig: 65, 56
offset: 0, 0
index: -1
front_shin
rotate: true
xy: 444, 91
size: 49, 110
orig: 49, 110
offset: 0, 0
index: -1
front_thigh
rotate: true
xy: 603, 89
size: 29, 67
orig: 29, 67
offset: 0, 0
index: -1
front_upper_arm
rotate: true
xy: 672, 86
size: 32, 58
orig: 32, 58
offset: 0, 0
index: -1
goggles
rotate: false
xy: 444, 142
size: 157, 100
orig: 157, 100
offset: 0, 0
index: -1
gun
rotate: false
xy: 603, 120
size: 126, 122
orig: 126, 122
offset: 0, 0
index: -1
head
rotate: false
xy: 279, 63
size: 163, 179
orig: 163, 179
offset: 0, 0
index: -1
mouth_grind
rotate: false
xy: 845, 163
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
mouth_oooo
rotate: false
xy: 842, 126
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
mouth_smile
rotate: false
xy: 769, 97
size: 56, 35
orig: 56, 35
offset: 0, 0
index: -1
muzzle
rotate: false
xy: 2, 2
size: 275, 240
orig: 277, 240
offset: 0, 0
index: -1
neck
rotate: false
xy: 903, 173
size: 22, 25
orig: 22, 25
offset: 0, 0
index: -1
rear_bracer
rotate: false
xy: 722, 40
size: 34, 43
orig: 34, 43
offset: 0, 0
index: -1
rear_foot
rotate: false
xy: 444, 11
size: 68, 36
orig: 68, 36
offset: 0, 0
index: -1
rear_foot_bend1
rotate: false
xy: 444, 49
size: 70, 40
orig: 70, 40
offset: 0, 0
index: -1
rear_foot_bend2
rotate: false
xy: 778, 134
size: 62, 50
orig: 62, 50
offset: 0, 0
index: -1
rear_shin
rotate: false
xy: 731, 135
size: 45, 107
orig: 45, 107
offset: 0, 0
index: -1
rear_thigh
rotate: true
xy: 516, 50
size: 39, 62
orig: 39, 62
offset: 0, 0
index: -1
rear_upper_arm
rotate: false
xy: 638, 35
size: 28, 52
orig: 28, 52
offset: 0, 0
index: -1
torso
rotate: true
xy: 279, 2
size: 59, 108
orig: 59, 108
offset: 0, 0
index: -1

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

View File

@ -0,0 +1,12 @@
#import "cocos2d.h"
#import <spine/spine-cocos2d-iphone.h>
@interface GoblinsExample : CCNode {
SkeletonAnimation* skeletonNode;
}
+ (CCScene*) scene;
@end

View File

@ -0,0 +1,46 @@
#import "GoblinsExample.h"
#import "SpineboyExample.h"
@implementation GoblinsExample
+ (CCScene*) scene {
CCScene *scene = [CCScene node];
[scene addChild:[GoblinsExample node]];
return scene;
}
-(id) init {
self = [super init];
if (!self) return nil;
skeletonNode = [SkeletonAnimation skeletonWithFile:@"goblins-ffd.json" atlasFile:@"goblins-ffd.atlas" scale:1];
[skeletonNode setSkin:@"goblin"];
[skeletonNode setAnimationForTrack:0 name:@"walk" loop:YES];
CGSize windowSize = [[CCDirector sharedDirector] viewSize];
[skeletonNode setPosition:ccp(windowSize.width / 2, 20)];
[self addChild:skeletonNode];
self.userInteractionEnabled = YES;
return self;
}
#if __CC_PLATFORM_MAC
- (BOOL) ccMouseDown:(NSEvent*)event {
#else
- (void) ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
#endif
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
}
@end

View File

@ -0,0 +1,12 @@
#import "cocos2d.h"
#import <spine/spine-cocos2d-iphone.h>
@interface SpineboyExample : CCNode {
SkeletonAnimation* skeletonNode;
}
+ (CCScene*) scene;
@end

View File

@ -0,0 +1,72 @@
#import "SpineboyExample.h"
#import "GoblinsExample.h"
@implementation SpineboyExample
+ (CCScene*) scene {
CCScene *scene = [CCScene node];
[scene addChild:[SpineboyExample node]];
return scene;
}
-(id) init {
self = [super init];
if (!self) return nil;
skeletonNode = [SkeletonAnimation skeletonWithFile:@"spineboy.json" atlasFile:@"spineboy.atlas" scale:0.6];
[skeletonNode setMixFrom:@"walk" to:@"jump" duration:0.2f];
[skeletonNode setMixFrom:@"jump" to:@"run" duration:0.2f];
__weak SkeletonAnimation* node = skeletonNode;
skeletonNode.startListener = ^(int trackIndex) {
spTrackEntry* entry = spAnimationState_getCurrent(node.state, trackIndex);
const char* animationName = (entry && entry->animation) ? entry->animation->name : 0;
NSLog(@"%d start: %s", trackIndex, animationName);
};
skeletonNode.endListener = ^(int trackIndex) {
NSLog(@"%d end", trackIndex);
};
skeletonNode.completeListener = ^(int trackIndex, int loopCount) {
NSLog(@"%d complete: %d", trackIndex, loopCount);
};
skeletonNode.eventListener = ^(int trackIndex, spEvent* event) {
NSLog(@"%d event: %s, %d, %f, %s", trackIndex, event->data->name, event->intValue, event->floatValue, event->stringValue);
};
[skeletonNode setAnimationForTrack:0 name:@"walk" loop:YES];
TrackEntry* 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) {
CCLOG(@"jumped!");
}];
// [skeletonNode setAnimationForTrack:1 name:@"test" loop:YES];
CGSize windowSize = [[CCDirector sharedDirector] viewSize];
[skeletonNode setPosition:ccp(windowSize.width / 2, 20)];
[self addChild:skeletonNode];
self.userInteractionEnabled = YES;
return self;
}
#if __CC_PLATFORM_MAC
- (BOOL) ccMouseDown:(NSEvent*)event {
#else
- (void) ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event {
#endif
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
}
@end

View File

@ -0,0 +1,649 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
43C3282F170B0C19004A9460 /* spine-cocos2d-iphone.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
43C3286C170B0DA6004A9460 /* spineboy.json in Resources */ = {isa = PBXBuildFile; fileRef = 43C32868170B0DA6004A9460 /* spineboy.json */; };
43C3286E170B0DA6004A9460 /* spineboy.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43C3286A170B0DA6004A9460 /* spineboy.atlas */; };
43C3286F170B0DA6004A9460 /* spineboy.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C3286B170B0DA6004A9460 /* spineboy.png */; };
43C3287D170B0DBE004A9460 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32871170B0DBE004A9460 /* Default-568h@2x.png */; };
43C3287E170B0DBE004A9460 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32872170B0DBE004A9460 /* Default-Landscape~ipad.png */; };
43C3287F170B0DBE004A9460 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32873170B0DBE004A9460 /* Default.png */; };
43C32880170B0DBE004A9460 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32874170B0DBE004A9460 /* Default@2x.png */; };
43C32881170B0DBE004A9460 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32875170B0DBE004A9460 /* Icon-72.png */; };
43C32882170B0DBE004A9460 /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32876170B0DBE004A9460 /* Icon-Small-50.png */; };
43C32883170B0DBE004A9460 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32877170B0DBE004A9460 /* Icon-Small.png */; };
43C32884170B0DBE004A9460 /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32878170B0DBE004A9460 /* Icon-Small@2x.png */; };
43C32885170B0DBE004A9460 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C32879170B0DBE004A9460 /* Icon.png */; };
43C32886170B0DBE004A9460 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 43C3287A170B0DBE004A9460 /* Icon@2x.png */; };
43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 43C3287C170B0DBE004A9460 /* iTunesArtwork */; };
43C32A06170B0F93004A9460 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A05170B0F93004A9460 /* main.m */; };
43C32A09170B10FF004A9460 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43C32A08170B10FF004A9460 /* AppDelegate.m */; };
43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */; };
43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010D1927FBC700CA4038 /* goblins-ffd.json */; };
43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */ = {isa = PBXBuildFile; fileRef = 43F7010E1927FBC700CA4038 /* goblins-ffd.png */; };
43F7FF511927F91900CA4038 /* Animation.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF381927F91900CA4038 /* Animation.c */; };
43F7FF521927F91900CA4038 /* AnimationState.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF391927F91900CA4038 /* AnimationState.c */; };
43F7FF531927F91900CA4038 /* AnimationStateData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3A1927F91900CA4038 /* AnimationStateData.c */; };
43F7FF541927F91900CA4038 /* Atlas.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3B1927F91900CA4038 /* Atlas.c */; };
43F7FF551927F91900CA4038 /* AtlasAttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3C1927F91900CA4038 /* AtlasAttachmentLoader.c */; };
43F7FF561927F91900CA4038 /* Attachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3D1927F91900CA4038 /* Attachment.c */; };
43F7FF571927F91900CA4038 /* AttachmentLoader.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3E1927F91900CA4038 /* AttachmentLoader.c */; };
43F7FF581927F91900CA4038 /* Bone.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF3F1927F91900CA4038 /* Bone.c */; };
43F7FF591927F91900CA4038 /* BoneData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF401927F91900CA4038 /* BoneData.c */; };
43F7FF5A1927F91900CA4038 /* BoundingBoxAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF411927F91900CA4038 /* BoundingBoxAttachment.c */; };
43F7FF5B1927F91900CA4038 /* Event.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF421927F91900CA4038 /* Event.c */; };
43F7FF5C1927F91900CA4038 /* EventData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF431927F91900CA4038 /* EventData.c */; };
43F7FF5D1927F91900CA4038 /* extension.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF441927F91900CA4038 /* extension.c */; };
43F7FF5E1927F91900CA4038 /* Json.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF451927F91900CA4038 /* Json.c */; };
43F7FF5F1927F91900CA4038 /* MeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF471927F91900CA4038 /* MeshAttachment.c */; };
43F7FF601927F91900CA4038 /* RegionAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF481927F91900CA4038 /* RegionAttachment.c */; };
43F7FF611927F91900CA4038 /* Skeleton.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF491927F91900CA4038 /* Skeleton.c */; };
43F7FF621927F91900CA4038 /* SkeletonBounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4A1927F91900CA4038 /* SkeletonBounds.c */; };
43F7FF631927F91900CA4038 /* SkeletonData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4B1927F91900CA4038 /* SkeletonData.c */; };
43F7FF641927F91900CA4038 /* SkeletonJson.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4C1927F91900CA4038 /* SkeletonJson.c */; };
43F7FF651927F91900CA4038 /* Skin.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4D1927F91900CA4038 /* Skin.c */; };
43F7FF661927F91900CA4038 /* SkinnedMeshAttachment.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4E1927F91900CA4038 /* SkinnedMeshAttachment.c */; };
43F7FF671927F91900CA4038 /* Slot.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF4F1927F91900CA4038 /* Slot.c */; };
43F7FF681927F91900CA4038 /* SlotData.c in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF501927F91900CA4038 /* SlotData.c */; };
43F7FF871927F94800CA4038 /* PolygonBatch.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF821927F94800CA4038 /* PolygonBatch.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
43F7FF881927F94800CA4038 /* SkeletonAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF841927F94800CA4038 /* SkeletonAnimation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
43F7FF891927F94800CA4038 /* SkeletonRenderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF861927F94800CA4038 /* SkeletonRenderer.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
43F7FF8E1927F96700CA4038 /* GoblinsExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF8B1927F96700CA4038 /* GoblinsExample.m */; };
43F7FF8F1927F96700CA4038 /* SpineboyExample.m in Sources */ = {isa = PBXBuildFile; fileRef = 43F7FF8D1927F96700CA4038 /* SpineboyExample.m */; };
652107961895250000B1FF07 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 652107951895250000B1FF07 /* CoreText.framework */; };
9A5D2499170A94DA0030D4DD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D2498170A94DA0030D4DD /* QuartzCore.framework */; };
9A5D249B170A94DA0030D4DD /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D249A170A94DA0030D4DD /* OpenGLES.framework */; };
9A5D249D170A94DA0030D4DD /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D249C170A94DA0030D4DD /* OpenAL.framework */; };
9A5D249F170A94DA0030D4DD /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D249E170A94DA0030D4DD /* AudioToolbox.framework */; };
9A5D24A1170A94DA0030D4DD /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D24A0170A94DA0030D4DD /* AVFoundation.framework */; };
9A5D24A3170A94DA0030D4DD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D24A2170A94DA0030D4DD /* UIKit.framework */; };
9A5D24A5170A94DA0030D4DD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D24A4170A94DA0030D4DD /* Foundation.framework */; };
9A5D24A7170A94DA0030D4DD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D24A6170A94DA0030D4DD /* CoreGraphics.framework */; };
9A5D24A9170A94DA0030D4DD /* GameKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A5D24A8170A94DA0030D4DD /* GameKit.framework */; };
A28E1F0C192926C500D16B23 /* libcocos2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A28E1F0B192926A300D16B23 /* libcocos2d.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
A28E1F0A192926A300D16B23 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = A28E1F04192926A200D16B23 /* cocos2d-ios.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 5018F24D0DFDEAC400C013A5;
remoteInfo = cocos2d;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
43C3282D170B0C19004A9460 /* 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>"; };
43C3282E170B0C19004A9460 /* 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>"; };
43C32868170B0DA6004A9460 /* spineboy.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = spineboy.json; path = Resources/spineboy.json; sourceTree = "<group>"; };
43C3286A170B0DA6004A9460 /* spineboy.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = spineboy.atlas; path = Resources/spineboy.atlas; sourceTree = "<group>"; };
43C3286B170B0DA6004A9460 /* spineboy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = spineboy.png; path = Resources/spineboy.png; sourceTree = "<group>"; };
43C32871170B0DBE004A9460 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "Resources-ios/Default-568h@2x.png"; sourceTree = "<group>"; };
43C32872170B0DBE004A9460 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape~ipad.png"; path = "Resources-ios/Default-Landscape~ipad.png"; sourceTree = "<group>"; };
43C32873170B0DBE004A9460 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = "Resources-ios/Default.png"; sourceTree = "<group>"; };
43C32874170B0DBE004A9460 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources-ios/Default@2x.png"; sourceTree = "<group>"; };
43C32875170B0DBE004A9460 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "Resources-ios/Icon-72.png"; sourceTree = "<group>"; };
43C32876170B0DBE004A9460 /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small-50.png"; path = "Resources-ios/Icon-Small-50.png"; sourceTree = "<group>"; };
43C32877170B0DBE004A9460 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Resources-ios/Icon-Small.png"; sourceTree = "<group>"; };
43C32878170B0DBE004A9460 /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small@2x.png"; path = "Resources-ios/Icon-Small@2x.png"; sourceTree = "<group>"; };
43C32879170B0DBE004A9460 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = "Resources-ios/Icon.png"; sourceTree = "<group>"; };
43C3287A170B0DBE004A9460 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "Resources-ios/Icon@2x.png"; sourceTree = "<group>"; };
43C3287B170B0DBE004A9460 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Resources-ios/Info.plist"; sourceTree = "<group>"; };
43C3287C170B0DBE004A9460 /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; name = iTunesArtwork; path = "Resources-ios/iTunesArtwork"; sourceTree = "<group>"; };
43C32889170B0E9F004A9460 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = "Resources-ios/Prefix.pch"; sourceTree = "<group>"; };
43C32A05170B0F93004A9460 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = "Resources-ios/main.m"; sourceTree = "<group>"; };
43C32A07170B10FF004A9460 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = "Resources-ios/AppDelegate.h"; sourceTree = "<group>"; };
43C32A08170B10FF004A9460 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = "Resources-ios/AppDelegate.m"; sourceTree = "<group>"; };
43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "goblins-ffd.atlas"; path = "Resources/goblins-ffd.atlas"; sourceTree = "<group>"; };
43F7010D1927FBC700CA4038 /* goblins-ffd.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = "goblins-ffd.json"; path = "Resources/goblins-ffd.json"; sourceTree = "<group>"; };
43F7010E1927FBC700CA4038 /* goblins-ffd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "goblins-ffd.png"; path = "Resources/goblins-ffd.png"; sourceTree = "<group>"; };
43F7FF381927F91900CA4038 /* Animation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Animation.c; path = "../../spine-c/src/spine/Animation.c"; sourceTree = "<group>"; };
43F7FF391927F91900CA4038 /* AnimationState.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationState.c; path = "../../spine-c/src/spine/AnimationState.c"; sourceTree = "<group>"; };
43F7FF3A1927F91900CA4038 /* AnimationStateData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AnimationStateData.c; path = "../../spine-c/src/spine/AnimationStateData.c"; sourceTree = "<group>"; };
43F7FF3B1927F91900CA4038 /* Atlas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Atlas.c; path = "../../spine-c/src/spine/Atlas.c"; sourceTree = "<group>"; };
43F7FF3C1927F91900CA4038 /* AtlasAttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AtlasAttachmentLoader.c; path = "../../spine-c/src/spine/AtlasAttachmentLoader.c"; sourceTree = "<group>"; };
43F7FF3D1927F91900CA4038 /* Attachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Attachment.c; path = "../../spine-c/src/spine/Attachment.c"; sourceTree = "<group>"; };
43F7FF3E1927F91900CA4038 /* AttachmentLoader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = AttachmentLoader.c; path = "../../spine-c/src/spine/AttachmentLoader.c"; sourceTree = "<group>"; };
43F7FF3F1927F91900CA4038 /* Bone.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Bone.c; path = "../../spine-c/src/spine/Bone.c"; sourceTree = "<group>"; };
43F7FF401927F91900CA4038 /* BoneData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoneData.c; path = "../../spine-c/src/spine/BoneData.c"; sourceTree = "<group>"; };
43F7FF411927F91900CA4038 /* BoundingBoxAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = BoundingBoxAttachment.c; path = "../../spine-c/src/spine/BoundingBoxAttachment.c"; sourceTree = "<group>"; };
43F7FF421927F91900CA4038 /* Event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Event.c; path = "../../spine-c/src/spine/Event.c"; sourceTree = "<group>"; };
43F7FF431927F91900CA4038 /* EventData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = EventData.c; path = "../../spine-c/src/spine/EventData.c"; sourceTree = "<group>"; };
43F7FF441927F91900CA4038 /* extension.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = extension.c; path = "../../spine-c/src/spine/extension.c"; sourceTree = "<group>"; };
43F7FF451927F91900CA4038 /* Json.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Json.c; path = "../../spine-c/src/spine/Json.c"; sourceTree = "<group>"; };
43F7FF461927F91900CA4038 /* Json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Json.h; path = "../../spine-c/src/spine/Json.h"; sourceTree = "<group>"; };
43F7FF471927F91900CA4038 /* MeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = MeshAttachment.c; path = "../../spine-c/src/spine/MeshAttachment.c"; sourceTree = "<group>"; };
43F7FF481927F91900CA4038 /* RegionAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = RegionAttachment.c; path = "../../spine-c/src/spine/RegionAttachment.c"; sourceTree = "<group>"; };
43F7FF491927F91900CA4038 /* Skeleton.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skeleton.c; path = "../../spine-c/src/spine/Skeleton.c"; sourceTree = "<group>"; };
43F7FF4A1927F91900CA4038 /* SkeletonBounds.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonBounds.c; path = "../../spine-c/src/spine/SkeletonBounds.c"; sourceTree = "<group>"; };
43F7FF4B1927F91900CA4038 /* SkeletonData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonData.c; path = "../../spine-c/src/spine/SkeletonData.c"; sourceTree = "<group>"; };
43F7FF4C1927F91900CA4038 /* SkeletonJson.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkeletonJson.c; path = "../../spine-c/src/spine/SkeletonJson.c"; sourceTree = "<group>"; };
43F7FF4D1927F91900CA4038 /* Skin.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Skin.c; path = "../../spine-c/src/spine/Skin.c"; sourceTree = "<group>"; };
43F7FF4E1927F91900CA4038 /* SkinnedMeshAttachment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SkinnedMeshAttachment.c; path = "../../spine-c/src/spine/SkinnedMeshAttachment.c"; sourceTree = "<group>"; };
43F7FF4F1927F91900CA4038 /* Slot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = Slot.c; path = "../../spine-c/src/spine/Slot.c"; sourceTree = "<group>"; };
43F7FF501927F91900CA4038 /* SlotData.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SlotData.c; path = "../../spine-c/src/spine/SlotData.c"; sourceTree = "<group>"; };
43F7FF691927F92500CA4038 /* Animation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Animation.h; path = "../../spine-c/include/spine/Animation.h"; sourceTree = "<group>"; };
43F7FF6A1927F92500CA4038 /* AnimationState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationState.h; path = "../../spine-c/include/spine/AnimationState.h"; sourceTree = "<group>"; };
43F7FF6B1927F92500CA4038 /* AnimationStateData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnimationStateData.h; path = "../../spine-c/include/spine/AnimationStateData.h"; sourceTree = "<group>"; };
43F7FF6C1927F92500CA4038 /* Atlas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Atlas.h; path = "../../spine-c/include/spine/Atlas.h"; sourceTree = "<group>"; };
43F7FF6D1927F92500CA4038 /* AtlasAttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtlasAttachmentLoader.h; path = "../../spine-c/include/spine/AtlasAttachmentLoader.h"; sourceTree = "<group>"; };
43F7FF6E1927F92500CA4038 /* Attachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Attachment.h; path = "../../spine-c/include/spine/Attachment.h"; sourceTree = "<group>"; };
43F7FF6F1927F92500CA4038 /* AttachmentLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AttachmentLoader.h; path = "../../spine-c/include/spine/AttachmentLoader.h"; sourceTree = "<group>"; };
43F7FF701927F92500CA4038 /* Bone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Bone.h; path = "../../spine-c/include/spine/Bone.h"; sourceTree = "<group>"; };
43F7FF711927F92500CA4038 /* BoneData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoneData.h; path = "../../spine-c/include/spine/BoneData.h"; sourceTree = "<group>"; };
43F7FF721927F92500CA4038 /* BoundingBoxAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BoundingBoxAttachment.h; path = "../../spine-c/include/spine/BoundingBoxAttachment.h"; sourceTree = "<group>"; };
43F7FF731927F92500CA4038 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = "../../spine-c/include/spine/Event.h"; sourceTree = "<group>"; };
43F7FF741927F92500CA4038 /* EventData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EventData.h; path = "../../spine-c/include/spine/EventData.h"; sourceTree = "<group>"; };
43F7FF751927F92500CA4038 /* extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extension.h; path = "../../spine-c/include/spine/extension.h"; sourceTree = "<group>"; };
43F7FF761927F92500CA4038 /* MeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MeshAttachment.h; path = "../../spine-c/include/spine/MeshAttachment.h"; sourceTree = "<group>"; };
43F7FF771927F92500CA4038 /* RegionAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegionAttachment.h; path = "../../spine-c/include/spine/RegionAttachment.h"; sourceTree = "<group>"; };
43F7FF781927F92500CA4038 /* Skeleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skeleton.h; path = "../../spine-c/include/spine/Skeleton.h"; sourceTree = "<group>"; };
43F7FF791927F92500CA4038 /* SkeletonBounds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonBounds.h; path = "../../spine-c/include/spine/SkeletonBounds.h"; sourceTree = "<group>"; };
43F7FF7A1927F92500CA4038 /* SkeletonData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonData.h; path = "../../spine-c/include/spine/SkeletonData.h"; sourceTree = "<group>"; };
43F7FF7B1927F92500CA4038 /* SkeletonJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonJson.h; path = "../../spine-c/include/spine/SkeletonJson.h"; sourceTree = "<group>"; };
43F7FF7C1927F92500CA4038 /* Skin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Skin.h; path = "../../spine-c/include/spine/Skin.h"; sourceTree = "<group>"; };
43F7FF7D1927F92500CA4038 /* SkinnedMeshAttachment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkinnedMeshAttachment.h; path = "../../spine-c/include/spine/SkinnedMeshAttachment.h"; sourceTree = "<group>"; };
43F7FF7E1927F92500CA4038 /* Slot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Slot.h; path = "../../spine-c/include/spine/Slot.h"; sourceTree = "<group>"; };
43F7FF7F1927F92500CA4038 /* SlotData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SlotData.h; path = "../../spine-c/include/spine/SlotData.h"; sourceTree = "<group>"; };
43F7FF801927F92500CA4038 /* spine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = spine.h; path = "../../spine-c/include/spine/spine.h"; sourceTree = "<group>"; };
43F7FF811927F94800CA4038 /* PolygonBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PolygonBatch.h; path = src/spine/PolygonBatch.h; sourceTree = "<group>"; };
43F7FF821927F94800CA4038 /* PolygonBatch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PolygonBatch.m; path = src/spine/PolygonBatch.m; sourceTree = "<group>"; };
43F7FF831927F94800CA4038 /* SkeletonAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonAnimation.h; path = src/spine/SkeletonAnimation.h; sourceTree = "<group>"; };
43F7FF841927F94800CA4038 /* SkeletonAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonAnimation.m; path = src/spine/SkeletonAnimation.m; sourceTree = "<group>"; };
43F7FF851927F94800CA4038 /* SkeletonRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkeletonRenderer.h; path = src/spine/SkeletonRenderer.h; sourceTree = "<group>"; };
43F7FF861927F94800CA4038 /* SkeletonRenderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkeletonRenderer.m; path = src/spine/SkeletonRenderer.m; sourceTree = "<group>"; };
43F7FF8A1927F96700CA4038 /* GoblinsExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GoblinsExample.h; path = example/GoblinsExample.h; sourceTree = "<group>"; };
43F7FF8B1927F96700CA4038 /* GoblinsExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GoblinsExample.m; path = example/GoblinsExample.m; sourceTree = "<group>"; };
43F7FF8C1927F96700CA4038 /* SpineboyExample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SpineboyExample.h; path = example/SpineboyExample.h; sourceTree = "<group>"; };
43F7FF8D1927F96700CA4038 /* SpineboyExample.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SpineboyExample.m; path = example/SpineboyExample.m; sourceTree = "<group>"; };
652107951895250000B1FF07 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
9A5D2495170A94DA0030D4DD /* SpineExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SpineExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
9A5D2498170A94DA0030D4DD /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
9A5D249A170A94DA0030D4DD /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
9A5D249C170A94DA0030D4DD /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
9A5D249E170A94DA0030D4DD /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
9A5D24A0170A94DA0030D4DD /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
9A5D24A2170A94DA0030D4DD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
9A5D24A4170A94DA0030D4DD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
9A5D24A6170A94DA0030D4DD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
9A5D24A8170A94DA0030D4DD /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
A28E1F04192926A200D16B23 /* cocos2d-ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "cocos2d-ios.xcodeproj"; path = "cocos2d/cocos2d-ios.xcodeproj"; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9A5D2492170A94DA0030D4DD /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A28E1F0C192926C500D16B23 /* libcocos2d.a in Frameworks */,
652107961895250000B1FF07 /* CoreText.framework in Frameworks */,
9A5D2499170A94DA0030D4DD /* QuartzCore.framework in Frameworks */,
9A5D249B170A94DA0030D4DD /* OpenGLES.framework in Frameworks */,
9A5D249D170A94DA0030D4DD /* OpenAL.framework in Frameworks */,
9A5D249F170A94DA0030D4DD /* AudioToolbox.framework in Frameworks */,
9A5D24A1170A94DA0030D4DD /* AVFoundation.framework in Frameworks */,
9A5D24A3170A94DA0030D4DD /* UIKit.framework in Frameworks */,
9A5D24A5170A94DA0030D4DD /* Foundation.framework in Frameworks */,
9A5D24A7170A94DA0030D4DD /* CoreGraphics.framework in Frameworks */,
9A5D24A9170A94DA0030D4DD /* GameKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
43C32821170B0BBC004A9460 /* Classes */ = {
isa = PBXGroup;
children = (
43C32822170B0BC2004A9460 /* spine-c */,
43C32823170B0BC7004A9460 /* spine-cocos2d-iphone */,
43F7FF8C1927F96700CA4038 /* SpineboyExample.h */,
43F7FF8D1927F96700CA4038 /* SpineboyExample.m */,
43F7FF8A1927F96700CA4038 /* GoblinsExample.h */,
43F7FF8B1927F96700CA4038 /* GoblinsExample.m */,
43C32A07170B10FF004A9460 /* AppDelegate.h */,
43C32A08170B10FF004A9460 /* AppDelegate.m */,
43C32A05170B0F93004A9460 /* main.m */,
43C32889170B0E9F004A9460 /* Prefix.pch */,
);
name = Classes;
sourceTree = "<group>";
};
43C32822170B0BC2004A9460 /* spine-c */ = {
isa = PBXGroup;
children = (
43F7FF381927F91900CA4038 /* Animation.c */,
43F7FF691927F92500CA4038 /* Animation.h */,
43F7FF391927F91900CA4038 /* AnimationState.c */,
43F7FF6A1927F92500CA4038 /* AnimationState.h */,
43F7FF3A1927F91900CA4038 /* AnimationStateData.c */,
43F7FF6B1927F92500CA4038 /* AnimationStateData.h */,
43F7FF3B1927F91900CA4038 /* Atlas.c */,
43F7FF6C1927F92500CA4038 /* Atlas.h */,
43F7FF3C1927F91900CA4038 /* AtlasAttachmentLoader.c */,
43F7FF6D1927F92500CA4038 /* AtlasAttachmentLoader.h */,
43F7FF3D1927F91900CA4038 /* Attachment.c */,
43F7FF6E1927F92500CA4038 /* Attachment.h */,
43F7FF3E1927F91900CA4038 /* AttachmentLoader.c */,
43F7FF6F1927F92500CA4038 /* AttachmentLoader.h */,
43F7FF3F1927F91900CA4038 /* Bone.c */,
43F7FF701927F92500CA4038 /* Bone.h */,
43F7FF401927F91900CA4038 /* BoneData.c */,
43F7FF711927F92500CA4038 /* BoneData.h */,
43F7FF411927F91900CA4038 /* BoundingBoxAttachment.c */,
43F7FF721927F92500CA4038 /* BoundingBoxAttachment.h */,
43F7FF421927F91900CA4038 /* Event.c */,
43F7FF731927F92500CA4038 /* Event.h */,
43F7FF431927F91900CA4038 /* EventData.c */,
43F7FF741927F92500CA4038 /* EventData.h */,
43F7FF441927F91900CA4038 /* extension.c */,
43F7FF751927F92500CA4038 /* extension.h */,
43F7FF451927F91900CA4038 /* Json.c */,
43F7FF461927F91900CA4038 /* Json.h */,
43F7FF471927F91900CA4038 /* MeshAttachment.c */,
43F7FF761927F92500CA4038 /* MeshAttachment.h */,
43F7FF481927F91900CA4038 /* RegionAttachment.c */,
43F7FF771927F92500CA4038 /* RegionAttachment.h */,
43F7FF491927F91900CA4038 /* Skeleton.c */,
43F7FF781927F92500CA4038 /* Skeleton.h */,
43F7FF4A1927F91900CA4038 /* SkeletonBounds.c */,
43F7FF791927F92500CA4038 /* SkeletonBounds.h */,
43F7FF4B1927F91900CA4038 /* SkeletonData.c */,
43F7FF7A1927F92500CA4038 /* SkeletonData.h */,
43F7FF4C1927F91900CA4038 /* SkeletonJson.c */,
43F7FF7B1927F92500CA4038 /* SkeletonJson.h */,
43F7FF4D1927F91900CA4038 /* Skin.c */,
43F7FF7C1927F92500CA4038 /* Skin.h */,
43F7FF4E1927F91900CA4038 /* SkinnedMeshAttachment.c */,
43F7FF7D1927F92500CA4038 /* SkinnedMeshAttachment.h */,
43F7FF4F1927F91900CA4038 /* Slot.c */,
43F7FF7E1927F92500CA4038 /* Slot.h */,
43F7FF501927F91900CA4038 /* SlotData.c */,
43F7FF7F1927F92500CA4038 /* SlotData.h */,
43F7FF801927F92500CA4038 /* spine.h */,
);
name = "spine-c";
sourceTree = "<group>";
};
43C32823170B0BC7004A9460 /* spine-cocos2d-iphone */ = {
isa = PBXGroup;
children = (
43F7FF811927F94800CA4038 /* PolygonBatch.h */,
43F7FF821927F94800CA4038 /* PolygonBatch.m */,
43F7FF831927F94800CA4038 /* SkeletonAnimation.h */,
43F7FF841927F94800CA4038 /* SkeletonAnimation.m */,
43F7FF851927F94800CA4038 /* SkeletonRenderer.h */,
43F7FF861927F94800CA4038 /* SkeletonRenderer.m */,
43C3282E170B0C19004A9460 /* spine-cocos2d-iphone.h */,
43C3282D170B0C19004A9460 /* spine-cocos2d-iphone.m */,
);
name = "spine-cocos2d-iphone";
sourceTree = "<group>";
};
43C32867170B0C7F004A9460 /* Resources */ = {
isa = PBXGroup;
children = (
43F7010C1927FBC700CA4038 /* goblins-ffd.atlas */,
43F7010D1927FBC700CA4038 /* goblins-ffd.json */,
43F7010E1927FBC700CA4038 /* goblins-ffd.png */,
43C32868170B0DA6004A9460 /* spineboy.json */,
43C3286A170B0DA6004A9460 /* spineboy.atlas */,
43C3286B170B0DA6004A9460 /* spineboy.png */,
);
name = Resources;
sourceTree = "<group>";
};
43C32870170B0DAD004A9460 /* Resources-ios */ = {
isa = PBXGroup;
children = (
43C32871170B0DBE004A9460 /* Default-568h@2x.png */,
43C32872170B0DBE004A9460 /* Default-Landscape~ipad.png */,
43C32873170B0DBE004A9460 /* Default.png */,
43C32874170B0DBE004A9460 /* Default@2x.png */,
43C32875170B0DBE004A9460 /* Icon-72.png */,
43C32876170B0DBE004A9460 /* Icon-Small-50.png */,
43C32877170B0DBE004A9460 /* Icon-Small.png */,
43C32878170B0DBE004A9460 /* Icon-Small@2x.png */,
43C32879170B0DBE004A9460 /* Icon.png */,
43C3287A170B0DBE004A9460 /* Icon@2x.png */,
43C3287B170B0DBE004A9460 /* Info.plist */,
43C3287C170B0DBE004A9460 /* iTunesArtwork */,
);
name = "Resources-ios";
sourceTree = "<group>";
};
9A5D248C170A94DA0030D4DD = {
isa = PBXGroup;
children = (
43C32821170B0BBC004A9460 /* Classes */,
43C32867170B0C7F004A9460 /* Resources */,
43C32870170B0DAD004A9460 /* Resources-ios */,
9A5D24C3170A94DA0030D4DD /* cocos2d */,
9A5D2497170A94DA0030D4DD /* Frameworks */,
9A5D2496170A94DA0030D4DD /* Products */,
);
sourceTree = "<group>";
};
9A5D2496170A94DA0030D4DD /* Products */ = {
isa = PBXGroup;
children = (
9A5D2495170A94DA0030D4DD /* SpineExample.app */,
);
name = Products;
sourceTree = "<group>";
};
9A5D2497170A94DA0030D4DD /* Frameworks */ = {
isa = PBXGroup;
children = (
652107951895250000B1FF07 /* CoreText.framework */,
9A5D2498170A94DA0030D4DD /* QuartzCore.framework */,
9A5D249A170A94DA0030D4DD /* OpenGLES.framework */,
9A5D249C170A94DA0030D4DD /* OpenAL.framework */,
9A5D249E170A94DA0030D4DD /* AudioToolbox.framework */,
9A5D24A0170A94DA0030D4DD /* AVFoundation.framework */,
9A5D24A2170A94DA0030D4DD /* UIKit.framework */,
9A5D24A4170A94DA0030D4DD /* Foundation.framework */,
9A5D24A6170A94DA0030D4DD /* CoreGraphics.framework */,
9A5D24A8170A94DA0030D4DD /* GameKit.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
9A5D24C3170A94DA0030D4DD /* cocos2d */ = {
isa = PBXGroup;
children = (
A28E1F04192926A200D16B23 /* cocos2d-ios.xcodeproj */,
);
name = cocos2d;
path = Spine;
sourceTree = "<group>";
};
A28E1F05192926A200D16B23 /* Products */ = {
isa = PBXGroup;
children = (
A28E1F0B192926A300D16B23 /* libcocos2d.a */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
9A5D2494170A94DA0030D4DD /* SpineExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 9A5D2643170A94DC0030D4DD /* Build configuration list for PBXNativeTarget "SpineExample" */;
buildPhases = (
9A5D2491170A94DA0030D4DD /* Sources */,
9A5D2492170A94DA0030D4DD /* Frameworks */,
9A5D2493170A94DA0030D4DD /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = SpineExample;
productName = "spine-cocos2d-iphone-ios";
productReference = 9A5D2495170A94DA0030D4DD /* SpineExample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
9A5D248D170A94DA0030D4DD /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0510;
ORGANIZATIONNAME = "Craig Hinrichs";
};
buildConfigurationList = 9A5D2490170A94DA0030D4DD /* Build configuration list for PBXProject "spine-cocos2d-iphone-ios" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 9A5D248C170A94DA0030D4DD;
productRefGroup = 9A5D2496170A94DA0030D4DD /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = A28E1F05192926A200D16B23 /* Products */;
ProjectRef = A28E1F04192926A200D16B23 /* cocos2d-ios.xcodeproj */;
},
);
projectRoot = "";
targets = (
9A5D2494170A94DA0030D4DD /* SpineExample */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
A28E1F0B192926A300D16B23 /* libcocos2d.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcocos2d.a;
remoteRef = A28E1F0A192926A300D16B23 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
9A5D2493170A94DA0030D4DD /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
43C3286C170B0DA6004A9460 /* spineboy.json in Resources */,
43C3286E170B0DA6004A9460 /* spineboy.atlas in Resources */,
43C3286F170B0DA6004A9460 /* spineboy.png in Resources */,
43C3287D170B0DBE004A9460 /* Default-568h@2x.png in Resources */,
43C3287E170B0DBE004A9460 /* Default-Landscape~ipad.png in Resources */,
43C3287F170B0DBE004A9460 /* Default.png in Resources */,
43C32880170B0DBE004A9460 /* Default@2x.png in Resources */,
43C32881170B0DBE004A9460 /* Icon-72.png in Resources */,
43C32882170B0DBE004A9460 /* Icon-Small-50.png in Resources */,
43C32883170B0DBE004A9460 /* Icon-Small.png in Resources */,
43C32884170B0DBE004A9460 /* Icon-Small@2x.png in Resources */,
43C32885170B0DBE004A9460 /* Icon.png in Resources */,
43C32886170B0DBE004A9460 /* Icon@2x.png in Resources */,
43C32888170B0DBE004A9460 /* iTunesArtwork in Resources */,
43F7010F1927FBC700CA4038 /* goblins-ffd.atlas in Resources */,
43F701101927FBC700CA4038 /* goblins-ffd.json in Resources */,
43F701111927FBC700CA4038 /* goblins-ffd.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9A5D2491170A94DA0030D4DD /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
43C3282F170B0C19004A9460 /* spine-cocos2d-iphone.m in Sources */,
43C32A06170B0F93004A9460 /* main.m in Sources */,
43C32A09170B10FF004A9460 /* AppDelegate.m in Sources */,
43F7FF511927F91900CA4038 /* Animation.c in Sources */,
43F7FF521927F91900CA4038 /* AnimationState.c in Sources */,
43F7FF531927F91900CA4038 /* AnimationStateData.c in Sources */,
43F7FF541927F91900CA4038 /* Atlas.c in Sources */,
43F7FF551927F91900CA4038 /* AtlasAttachmentLoader.c in Sources */,
43F7FF561927F91900CA4038 /* Attachment.c in Sources */,
43F7FF571927F91900CA4038 /* AttachmentLoader.c in Sources */,
43F7FF581927F91900CA4038 /* Bone.c in Sources */,
43F7FF591927F91900CA4038 /* BoneData.c in Sources */,
43F7FF5A1927F91900CA4038 /* BoundingBoxAttachment.c in Sources */,
43F7FF5B1927F91900CA4038 /* Event.c in Sources */,
43F7FF5C1927F91900CA4038 /* EventData.c in Sources */,
43F7FF5D1927F91900CA4038 /* extension.c in Sources */,
43F7FF5E1927F91900CA4038 /* Json.c in Sources */,
43F7FF5F1927F91900CA4038 /* MeshAttachment.c in Sources */,
43F7FF601927F91900CA4038 /* RegionAttachment.c in Sources */,
43F7FF611927F91900CA4038 /* Skeleton.c in Sources */,
43F7FF621927F91900CA4038 /* SkeletonBounds.c in Sources */,
43F7FF631927F91900CA4038 /* SkeletonData.c in Sources */,
43F7FF641927F91900CA4038 /* SkeletonJson.c in Sources */,
43F7FF651927F91900CA4038 /* Skin.c in Sources */,
43F7FF661927F91900CA4038 /* SkinnedMeshAttachment.c in Sources */,
43F7FF671927F91900CA4038 /* Slot.c in Sources */,
43F7FF681927F91900CA4038 /* SlotData.c in Sources */,
43F7FF871927F94800CA4038 /* PolygonBatch.m in Sources */,
43F7FF881927F94800CA4038 /* SkeletonAnimation.m in Sources */,
43F7FF891927F94800CA4038 /* SkeletonRenderer.m in Sources */,
43F7FF8E1927F96700CA4038 /* GoblinsExample.m in Sources */,
43F7FF8F1927F96700CA4038 /* SpineboyExample.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
9A5D2641170A94DC0030D4DD /* 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_OBJCPP_ARC_ABI = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = gnu99;
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;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
9A5D2642170A94DC0030D4DD /* 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_OBJCPP_ARC_ABI = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
GCC_C_LANGUAGE_STANDARD = gnu99;
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;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
9A5D2644170A94DC0030D4DD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Resources-ios/Prefix.pch";
HEADER_SEARCH_PATHS = (
"\"src\"",
"\"../../spine-c/include\"",
"\"cocos2d/cocos2d\"/**",
"\"cocos2d/external/kazmath/include\"",
"\"cocos2d/external/ObjectAL\"/**",
);
INFOPLIST_FILE = "Resources-ios/Info.plist";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = (
"-lz",
"-lsqlite3",
"-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
9A5D2645170A94DC0030D4DD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_ARC = YES;
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "Resources-ios/Prefix.pch";
HEADER_SEARCH_PATHS = (
"\"src\"",
"\"../../spine-c/include\"",
"\"cocos2d/cocos2d\"/**",
"\"cocos2d/external/kazmath/include\"",
"\"cocos2d/external/ObjectAL\"/**",
);
INFOPLIST_FILE = "Resources-ios/Info.plist";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = (
"-lz",
"-lsqlite3",
"-ObjC",
);
PRODUCT_NAME = "$(TARGET_NAME)";
VALIDATE_PRODUCT = YES;
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9A5D2490170A94DA0030D4DD /* Build configuration list for PBXProject "spine-cocos2d-iphone-ios" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9A5D2641170A94DC0030D4DD /* Debug */,
9A5D2642170A94DC0030D4DD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
9A5D2643170A94DC0030D4DD /* Build configuration list for PBXNativeTarget "SpineExample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
9A5D2644170A94DC0030D4DD /* Debug */,
9A5D2645170A94DC0030D4DD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 9A5D248D170A94DA0030D4DD /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:spine-cocos2d-iphone-ios.xcodeproj">
</FileRef>
</Workspace>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:spine-cocos2d-iphone-mac.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,51 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#import <spine/spine-cocos2d-iphone.h>
@interface PolygonBatch : NSObject {
int _capacity;
ccV2F_C4B_T2F* _vertices;
int _verticesCount;
GLushort* _triangles;
int _trianglesCount;
CCTexture* _texture;
}
+ (id) createWithCapacity:(int)capacity;
- (id) initWithCapacity:(int)capacity;
- (void) add:(CCTexture*)texture vertices:(const float*)vertices uvs:(const float*)uvs
verticesCount:(int)verticesCount triangles:(const int*)triangles trianglesCount:(int)trianglesCount
color:(ccColor4B*)color;
- (void) flush;
@end

View File

@ -0,0 +1,107 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#import <spine/PolygonBatch.h>
#import <spine/spine-cocos2d-iphone.h>
#import <spine/extension.h>
#import "CCTexture_Private.h"
@implementation PolygonBatch
+ (id) createWithCapacity:(int)capacity {
return [[(PolygonBatch*)[self alloc] initWithCapacity:capacity] autorelease];
}
- (id) initWithCapacity:(int)capacity {
// 32767 is max index, so 32767 / 3 - (32767 / 3 % 3) = 10920.
NSAssert(capacity <= 10920, @"capacity cannot be > 10920");
NSAssert(capacity >= 0, @"capacity cannot be < 0");
self = [super init];
if (!self) return nil;
_capacity = capacity;
_vertices = MALLOC(ccV2F_C4B_T2F, capacity);
_triangles = MALLOC(GLushort, capacity * 3);
return self;
}
- (void) dealloc {
FREE(_vertices);
FREE(_triangles);
[super dealloc];
}
- (void) add:(CCTexture*)addTexture vertices:(const float*)addVertices uvs:(const float*)uvs
verticesCount:(int)addVerticesCount triangles:(const int*)addTriangles trianglesCount:(int)addTrianglesCount
color:(ccColor4B*)color {
if (
addTexture != _texture
|| _verticesCount + (addVerticesCount >> 1) > _capacity
|| _trianglesCount + addTrianglesCount > _capacity * 3) {
[self flush];
_texture = addTexture;
}
for (int i = 0; i < addTrianglesCount; ++i, ++_trianglesCount)
_triangles[_trianglesCount] = addTriangles[i] + _verticesCount;
for (int i = 0; i < addVerticesCount; i += 2, ++_verticesCount) {
ccV2F_C4B_T2F* vertex = _vertices + _verticesCount;
vertex->vertices.x = addVertices[i];
vertex->vertices.y = addVertices[i + 1];
vertex->colors = *color;
vertex->texCoords.u = uvs[i];
vertex->texCoords.v = uvs[i + 1];
}
}
- (void) flush {
if (!_verticesCount) return;
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();
}
@end

View File

@ -0,0 +1,86 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* 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);
/** 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;
bool _ownsAnimationStateData;
StartListener _startListener;
EndListener _endListener;
CompleteListener _completeListener;
EventListener _eventListener;
}
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)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) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
- (void) setAnimationStateData:(AnimationStateData*)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;
- (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) 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;
@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;
@end

View File

@ -0,0 +1,253 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#import <spine/SkeletonAnimation.h>
#import <spine/spine-cocos2d-iphone.h>
#import <spine/extension.h>
static void animationCallback (AnimationState* state, int trackIndex, EventType type, Event* event, int loopCount) {
[(SkeletonAnimation*)state->rendererObject onAnimationStateEvent:trackIndex type:type event:event loopCount:loopCount];
}
void trackEntryCallback (spAnimationState* state, int trackIndex, spEventType type, spEvent* event, int loopCount) {
[(SkeletonAnimation*)state->rendererObject onTrackEntryEvent:trackIndex type:type event:event loopCount:loopCount];
}
typedef struct _TrackEntryListeners {
StartListener startListener;
EndListener endListener;
CompleteListener completeListener;
EventListener eventListener;
} _TrackEntryListeners;
static _TrackEntryListeners* getListeners (spTrackEntry* entry) {
if (!entry->rendererObject) {
entry->rendererObject = NEW(_TrackEntryListeners);
entry->listener = trackEntryCallback;
}
return (_TrackEntryListeners*)entry->rendererObject;
}
void disposeTrackEntry (spTrackEntry* entry) {
if (entry->rendererObject) {
_TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->rendererObject;
[listeners->startListener release];
[listeners->endListener release];
[listeners->completeListener release];
[listeners->eventListener release];
FREE(listeners);
}
_spTrackEntry_dispose(entry);
}
//
@interface SkeletonAnimation (Private)
- (void) initialize;
@end
@implementation SkeletonAnimation
@synthesize state = _state;
@synthesize startListener = _startListener;
@synthesize endListener = _endListener;
@synthesize completeListener = _completeListener;
@synthesize eventListener = _eventListener;
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
return [[[self alloc] initWithData:skeletonData ownsSkeletonData:ownsSkeletonData] autorelease];
}
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
return [[[self alloc] initWithFile:skeletonDataFile atlas:atlas scale:scale] autorelease];
}
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale {
return [[[self alloc] initWithFile:skeletonDataFile atlasFile:atlasFile scale:scale] autorelease];
}
- (void) initialize {
_ownsAnimationStateData = true;
_state = AnimationState_create(AnimationStateData_create(_skeleton->data));
_state->rendererObject = self;
_state->listener = animationCallback;
_spAnimationState* stateInternal = (_spAnimationState*)_state;
stateInternal->disposeTrackEntry = disposeTrackEntry;
}
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
self = [super initWithData:skeletonData ownsSkeletonData:ownsSkeletonData];
if (!self) return nil;
[self initialize];
return self;
}
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
self = [super initWithFile:skeletonDataFile atlas:atlas scale:scale];
if (!self) return nil;
[self initialize];
return self;
}
- (id) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale {
self = [super initWithFile:skeletonDataFile atlasFile:atlasFile scale:scale];
if (!self) return nil;
[self initialize];
return self;
}
- (void) dealloc {
if (_ownsAnimationStateData) AnimationStateData_dispose(_state->data);
AnimationState_dispose(_state);
[_startListener release];
[_endListener release];
[_completeListener release];
[_eventListener release];
[super dealloc];
}
- (void) update:(CCTime)deltaTime {
[super update:deltaTime];
deltaTime *= _timeScale;
AnimationState_update(_state, deltaTime);
AnimationState_apply(_state, _skeleton);
Skeleton_updateWorldTransform(_skeleton);
}
- (void) setAnimationStateData:(AnimationStateData*)stateData {
NSAssert(stateData, @"stateData cannot be null.");
if (_ownsAnimationStateData) AnimationStateData_dispose(_state->data);
AnimationState_dispose(_state);
_ownsAnimationStateData = false;
_state = AnimationState_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);
}
- (TrackEntry*) setAnimationForTrack:(int)trackIndex name:(NSString*)name loop:(bool)loop {
Animation* animation = SkeletonData_findAnimation(_skeleton->data, [name UTF8String]);
if (!animation) {
CCLOG(@"Spine: Animation not found: %@", name);
return 0;
}
return AnimationState_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]);
if (!animation) {
CCLOG(@"Spine: Animation not found: %@", name);
return 0;
}
return AnimationState_addAnimation(_state, trackIndex, animation, loop, delay);
}
- (TrackEntry*) getCurrentForTrack:(int)trackIndex {
return AnimationState_getCurrent(_state, trackIndex);
}
- (void) clearTracks {
AnimationState_clearTracks(_state);
}
- (void) clearTrack:(int)trackIndex {
AnimationState_clearTrack(_state, trackIndex);
}
- (void) onAnimationStateEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount {
switch (type) {
case SP_ANIMATION_START:
if (_startListener) _startListener(trackIndex);
break;
case SP_ANIMATION_END:
if (_endListener) _endListener(trackIndex);
break;
case SP_ANIMATION_COMPLETE:
if (_completeListener) _completeListener(trackIndex, loopCount);
break;
case SP_ANIMATION_EVENT:
if (_eventListener) _eventListener(trackIndex, event);
break;
}
}
- (void) onTrackEntryEvent:(int)trackIndex type:(EventType)type event:(Event*)event loopCount:(int)loopCount {
spTrackEntry* entry = spAnimationState_getCurrent(_state, trackIndex);
if (!entry->rendererObject) return;
_TrackEntryListeners* listeners = (_TrackEntryListeners*)entry->rendererObject;
switch (type) {
case SP_ANIMATION_START:
if (listeners->startListener) listeners->startListener(trackIndex);
break;
case SP_ANIMATION_END:
if (listeners->endListener) listeners->endListener(trackIndex);
break;
case SP_ANIMATION_COMPLETE:
if (listeners->completeListener) listeners->completeListener(trackIndex, loopCount);
break;
case SP_ANIMATION_EVENT:
if (listeners->eventListener) listeners->eventListener(trackIndex, event);
break;
}
}
- (void) setListenerForEntry:(spTrackEntry*)entry onStart:(StartListener)listener {
getListeners(entry)->startListener = [listener copy];
}
- (void) setListenerForEntry:(spTrackEntry*)entry onEnd:(EndListener)listener {
getListeners(entry)->endListener = [listener copy];
}
- (void) setListenerForEntry:(spTrackEntry*)entry onComplete:(CompleteListener)listener {
getListeners(entry)->completeListener = [listener copy];
}
- (void) setListenerForEntry:(spTrackEntry*)entry onEvent:(EventListener)listener {
getListeners(entry)->eventListener = [listener copy];
}
@end

View File

@ -0,0 +1,95 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#define SPINE_SHORT_NAMES
#import <spine/spine.h>
#import "cocos2d.h"
@class PolygonBatch;
/** Draws a skeleton. */
@interface SkeletonRenderer : CCNode<CCBlendProtocol> {
Skeleton* _skeleton;
Bone* _rootBone;
float _timeScale;
bool _debugSlots;
bool _debugBones;
bool _premultipliedAlpha;
ccBlendFunc _blendFunc;
bool _ownsSkeletonData;
Atlas* _atlas;
PolygonBatch* batch;
float* worldVertices;
}
+ (id) skeletonWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData;
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)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) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale;
- (CCTexture*) getTextureForRegion:(RegionAttachment*)attachment;
- (CCTexture*) getTextureForMesh:(MeshAttachment*)attachment;
- (CCTexture*) getTextureForSkinnedMesh:(SkinnedMeshAttachment*)attachment;
// --- Convenience methods for common Skeleton_* functions.
- (void) updateWorldTransform;
- (void) setToSetupPose;
- (void) setBonesToSetupPose;
- (void) setSlotsToSetupPose;
/* Returns 0 if the bone was not found. */
- (Bone*) findBone:(NSString*)boneName;
/* Returns 0 if the slot was not found. */
- (Slot*) 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
* attachment is attached from the new skin. Returns false if the skin was not found.
* @param skin May be 0.*/
- (bool) setSkin:(NSString*)skinName;
/* Returns 0 if the slot or attachment was not found. */
- (Attachment*) 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) bool debugSlots;
@property (nonatomic) bool debugBones;
@property (nonatomic) Bone* rootBone;
@end

View File

@ -0,0 +1,362 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#import <spine/SkeletonRenderer.h>
#import <spine/spine-cocos2d-iphone.h>
#import <spine/extension.h>
#import <spine/PolygonBatch.h>
#import "CCNode_Private.h"
static const int quadTriangles[6] = {0, 1, 2, 2, 3, 0};
@interface SkeletonRenderer (Private)
- (void) initialize:(SkeletonData*)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 {
return [[[self alloc] initWithData:skeletonData ownsSkeletonData:ownsSkeletonData] autorelease];
}
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
return [[[self alloc] initWithFile:skeletonDataFile atlas:atlas scale:scale] autorelease];
}
+ (id) skeletonWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale {
return [[[self alloc] initWithFile:skeletonDataFile atlasFile:atlasFile scale:scale] autorelease];
}
- (void) initialize:(SkeletonData*)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.
_skeleton = Skeleton_create(skeletonData);
_rootBone = _skeleton->bones[0];
_blendFunc.src = GL_ONE;
_blendFunc.dst = GL_ONE_MINUS_SRC_ALPHA;
[self setOpacityModifyRGB:YES];
[self setShaderProgram:[[CCShaderCache sharedShaderCache] programForKey:kCCShader_PositionTextureColor]];
}
- (id) initWithData:(SkeletonData*)skeletonData ownsSkeletonData:(bool)ownsSkeletonData {
NSAssert(skeletonData, @"skeletonData cannot be null.");
self = [super init];
if (!self) return nil;
[self initialize:skeletonData ownsSkeletonData:ownsSkeletonData];
return self;
}
- (id) initWithFile:(NSString*)skeletonDataFile atlas:(Atlas*)atlas scale:(float)scale {
self = [super init];
if (!self) return nil;
SkeletonJson* json = SkeletonJson_create(atlas);
json->scale = scale == 0 ? (1 / [CCDirector sharedDirector].contentScaleFactor) : scale;
SkeletonData* skeletonData = SkeletonJson_readSkeletonDataFile(json, [skeletonDataFile UTF8String]);
NSAssert(skeletonData, ([NSString stringWithFormat:@"Error reading skeleton data file: %@\nError: %s", skeletonDataFile, json->error]));
SkeletonJson_dispose(json);
if (!skeletonData) return 0;
[self initialize:skeletonData ownsSkeletonData:YES];
return self;
}
- (id) initWithFile:(NSString*)skeletonDataFile atlasFile:(NSString*)atlasFile scale:(float)scale {
self = [super init];
if (!self) return nil;
_atlas = Atlas_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]);
NSAssert(skeletonData, ([NSString stringWithFormat:@"Error reading skeleton data file: %@\nError: %s", skeletonDataFile, json->error]));
SkeletonJson_dispose(json);
if (!skeletonData) return 0;
[self initialize:skeletonData ownsSkeletonData:YES];
return self;
}
- (void) dealloc {
if (_ownsSkeletonData) SkeletonData_dispose(_skeleton->data);
if (_atlas) Atlas_dispose(_atlas);
Skeleton_dispose(_skeleton);
[batch release];
FREE(worldVertices);
[super dealloc];
}
- (void) update:(CCTime)deltaTime {
Skeleton_update(_skeleton, deltaTime * _timeScale);
}
- (void) draw {
CC_NODE_DRAW_SETUP();
CCColor* nodeColor = self.color;
_skeleton->r = nodeColor.red;
_skeleton->g = nodeColor.green;
_skeleton->b = nodeColor.blue;
_skeleton->a = self.opacity;
int additive = -1;
ccColor4B color;
const float* uvs = 0;
int verticesCount = 0;
const int* triangles = 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];
if (!slot->attachment) continue;
CCTexture *texture = 0;
switch (slot->attachment->type) {
case SP_ATTACHMENT_REGION: {
spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment;
spRegionAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot->bone, worldVertices);
texture = [self getTextureForRegion:attachment];
uvs = attachment->uvs;
verticesCount = 8;
triangles = quadTriangles;
trianglesCount = 6;
r = attachment->r;
g = attachment->g;
b = attachment->b;
a = attachment->a;
break;
}
case SP_ATTACHMENT_MESH: {
spMeshAttachment* attachment = (spMeshAttachment*)slot->attachment;
spMeshAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot, worldVertices);
texture = [self getTextureForMesh:attachment];
uvs = attachment->uvs;
verticesCount = attachment->verticesCount;
triangles = attachment->triangles;
trianglesCount = attachment->trianglesCount;
r = attachment->r;
g = attachment->g;
b = attachment->b;
a = attachment->a;
break;
}
case SP_ATTACHMENT_SKINNED_MESH: {
spSkinnedMeshAttachment* attachment = (spSkinnedMeshAttachment*)slot->attachment;
spSkinnedMeshAttachment_computeWorldVertices(attachment, slot->skeleton->x, slot->skeleton->y, slot, worldVertices);
texture = [self getTextureForSkinnedMesh:attachment];
uvs = attachment->uvs;
verticesCount = attachment->uvsCount;
triangles = attachment->triangles;
trianglesCount = attachment->trianglesCount;
r = attachment->r;
g = attachment->g;
b = attachment->b;
a = attachment->a;
break;
}
default: ;
}
if (texture) {
if (slot->data->additiveBlending != additive) {
[batch flush];
ccGLBlendFunc(_blendFunc.src, slot->data->additiveBlending ? GL_ONE : _blendFunc.dst);
additive = slot->data->additiveBlending;
}
color.a = _skeleton->a * slot->a * a * 255;
float multiplier = _premultipliedAlpha ? color.a : 255;
color.r = _skeleton->r * slot->r * r * multiplier;
color.g = _skeleton->g * slot->g * g * multiplier;
color.b = _skeleton->b * slot->b * b * multiplier;
[batch add:texture vertices:worldVertices uvs:uvs verticesCount:verticesCount
triangles:triangles trianglesCount:trianglesCount color:&color];
}
}
[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;
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]);
points[2] = ccp(worldVertices[4], worldVertices[5]);
points[3] = ccp(worldVertices[6], worldVertices[7]);
ccDrawPoly(points, 4, true);
}
}
if (_debugBones) {
// Bone lengths.
glLineWidth(2);
ccDrawColor4B(255, 0, 0, 255);
for (int i = 0, n = _skeleton->boneCount; i < n; i++) {
Bone *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));
}
// Bone origins.
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];
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*) getTextureForMesh:(MeshAttachment*)attachment {
return (CCTexture*)((AtlasRegion*)attachment->rendererObject)->page->rendererObject;
}
- (CCTexture*) getTextureForSkinnedMesh:(SkinnedMeshAttachment*)attachment {
return (CCTexture*)((AtlasRegion*)attachment->rendererObject)->page->rendererObject;
}
- (CGRect) boundingBox {
float minX = FLT_MAX, minY = FLT_MAX, maxX = FLT_MIN, maxY = FLT_MIN;
float scaleX = self.scaleX;
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);
}
minX = self.position.x + minX;
minY = self.position.y + minY;
maxX = self.position.x + maxX;
maxY = self.position.y + maxY;
return CGRectMake(minX, minY, maxX - minX, maxY - minY);
}
// --- Convenience methods for Skeleton_* functions.
- (void) updateWorldTransform {
Skeleton_updateWorldTransform(_skeleton);
}
- (void) setToSetupPose {
Skeleton_setToSetupPose(_skeleton);
}
- (void) setBonesToSetupPose {
Skeleton_setBonesToSetupPose(_skeleton);
}
- (void) setSlotsToSetupPose {
Skeleton_setSlotsToSetupPose(_skeleton);
}
- (Bone*) findBone:(NSString*)boneName {
return Skeleton_findBone(_skeleton, [boneName UTF8String]);
}
- (Slot*) findSlot:(NSString*)slotName {
return Skeleton_findSlot(_skeleton, [slotName UTF8String]);
}
- (bool) setSkin:(NSString*)skinName {
return (bool)Skeleton_setSkinByName(_skeleton, skinName ? [skinName UTF8String] : 0);
}
- (Attachment*) getAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName {
return Skeleton_getAttachmentForSlotName(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
}
- (bool) setAttachment:(NSString*)slotName attachmentName:(NSString*)attachmentName {
return (bool)Skeleton_setAttachment(_skeleton, [slotName UTF8String], [attachmentName UTF8String]);
}
// --- CCBlendProtocol
- (void) setBlendFunc:(ccBlendFunc)func {
self.blendFunc = func;
}
- (ccBlendFunc) blendFunc {
return _blendFunc;
}
- (void) setOpacityModifyRGB:(BOOL)value {
_premultipliedAlpha = value;
}
- (BOOL) doesOpacityModifyRGB {
return _premultipliedAlpha;
}
@end

View File

@ -0,0 +1,35 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#define SPINE_SHORT_NAMES
#import <spine/spine.h>
#import "cocos2d.h"
#import <spine/SkeletonRenderer.h>
#import <spine/SkeletonAnimation.h>

View File

@ -0,0 +1,48 @@
/******************************************************************************
* Spine Runtimes Software License
* Version 2.1
*
* Copyright (c) 2013, Esoteric Software
* All rights reserved.
*
* You are granted a perpetual, non-exclusive, non-sublicensable and
* non-transferable license to install, execute and perform the Spine Runtimes
* Software (the "Software") solely for internal use. Without the written
* permission of Esoteric Software (typically granted by licensing Spine), you
* may not (a) modify, translate, adapt or otherwise create derivative works,
* improvements of the Software or develop new applications using the Software
* or (b) remove, delete, alter or obscure any trademarks or any copyright,
* trademark, patent or other intellectual property or proprietary rights
* notices on or in the Software, including any copy thereof. Redistributions
* in binary or source form must include this license and terms.
*
* THIS SOFTWARE IS PROVIDED BY ESOTERIC SOFTWARE "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
* EVENT SHALL ESOTERIC SOFTARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*****************************************************************************/
#import <spine/spine-cocos2d-iphone.h>
#import <spine/extension.h>
void _AtlasPage_createTexture (AtlasPage* self, const char* path) {
CCTexture* texture = [[CCTexture textureWithFile:@(path)] retain];
self->rendererObject = texture;
CGSize size = texture.contentSizeInPixels;
self->width = size.width;
self->height = size.height;
}
void _AtlasPage_disposeTexture (AtlasPage* self) {
[(CCTexture*)self->rendererObject release];
}
char* _Util_readFile (const char* path, int* length) {
return _readFile([[[CCFileUtils sharedFileUtils] fullPathForFilename:@(path)] UTF8String], length);
}