Permalink
Browse files

Initial commit. Created iOS & Mac template projects.

  • Loading branch information...
cocos2d authored and psineur committed May 30, 2011
0 parents commit 03f2c9ce7ee58aaf664aa9bb60f398b2f05d9a3b
Showing with 5,830 additions and 0 deletions.
  1. +23 −0 LICENSE.cocos2d
  2. +22 −0 LICENSE.cocos2d-extensions
  3. BIN Tests/SharedResources/Default.png
  4. +2 −0 Tests/SharedResources/English.lproj/InfoPlist.strings
  5. +958 −0 Tests/SharedResources/English.lproj/MainMenu.xib
  6. BIN Tests/SharedResources/Icon-72.png
  7. BIN Tests/SharedResources/Icon-Small-50.png
  8. BIN Tests/SharedResources/Icon-Small.png
  9. BIN Tests/SharedResources/Icon-Small@2x.png
  10. BIN Tests/SharedResources/Icon.png
  11. BIN Tests/SharedResources/Icon@2x.png
  12. +32 −0 Tests/SharedResources/Info-Mac.plist
  13. +48 −0 Tests/SharedResources/Info.plist
  14. BIN Tests/SharedResources/fps_images.png
  15. BIN Tests/SharedResources/iTunesArtwork
  16. BIN Tests/SharedResources/icon.icns
  17. +63 −0 Tests/SharedSources/GameConfig.h
  18. +39 −0 Tests/SharedSources/HelloWorldLayer.h
  19. +81 −0 Tests/SharedSources/HelloWorldLayer.m
  20. +34 −0 Tests/SharedSources/RootViewController.h
  21. +170 −0 Tests/SharedSources/RootViewController.m
  22. +38 −0 Tests/SharedSources/cocos2d_extensions_iosAppDelegate.h
  23. +177 −0 Tests/SharedSources/cocos2d_extensions_iosAppDelegate.m
  24. +8 −0 Tests/SharedSources/cocos2d_extensions_ios_Prefix.pch
  25. +22 −0 Tests/SharedSources/cocos2d_extensions_macAppDelegate.h
  26. +55 −0 Tests/SharedSources/cocos2d_extensions_macAppDelegate.m
  27. +7 −0 Tests/SharedSources/cocos2d_extensions_mac_Prefix.pch
  28. +51 −0 Tests/SharedSources/main.m
  29. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/categories.pbxbtree
  30. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/cdecls.pbxbtree
  31. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/decls.pbxbtree
  32. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/files.pbxbtree
  33. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/imports.pbxbtree
  34. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/pbxindex.header
  35. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/protocols.pbxbtree
  36. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/refs.pbxbtree
  37. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/strings.pbxstrings/control
  38. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/strings.pbxstrings/strings
  39. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/subclasses.pbxbtree
  40. BIN build/cocos2d-extensions-ios.build/cocos2d-extensions-ios.pbxindex/symbols0.pbxsymbols
  41. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/categories.pbxbtree
  42. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/cdecls.pbxbtree
  43. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/decls.pbxbtree
  44. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/files.pbxbtree
  45. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/imports.pbxbtree
  46. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/pbxindex.header
  47. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/protocols.pbxbtree
  48. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/refs.pbxbtree
  49. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/strings.pbxstrings/control
  50. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/strings.pbxstrings/strings
  51. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/subclasses.pbxbtree
  52. BIN build/cocos2d-extensions-mac.build/cocos2d-extensions-mac.pbxindex/symbols0.pbxsymbols
  53. +531 −0 cocos2d-extensions-ios.xcodeproj/project.pbxproj
  54. +1,365 −0 cocos2d-extensions-ios.xcodeproj/psi.mode1v3
  55. +119 −0 cocos2d-extensions-ios.xcodeproj/psi.pbxuser
  56. +502 −0 cocos2d-extensions-mac.xcodeproj/project.pbxproj
  57. +1,360 −0 cocos2d-extensions-mac.xcodeproj/psi.mode1v3
  58. +123 −0 cocos2d-extensions-mac.xcodeproj/psi.pbxuser
@@ -0,0 +1,23 @@
+cocos2d for iPhone: http://www.cocos2d-iphone.org
+
+Copyright (c) 2011 - Zynga Inc. and contributors
+(see each file to see the different copyright owners)
+
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,22 @@
+cocos2d for iPhone extensions: https://github.com/cocos2d/cocos2d-iphone
+
+Copyright (c) 2011 - Happy Cocos2D Community
+(see each file to see the different copyright owners)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Binary file not shown.
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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>
@@ -0,0 +1,48 @@
+<?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-1</key>
+ <true/>
+ </dict>
+</dict>
+</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,63 @@
+/*
+ * cocos2d-extensions
+ * https://github.com/cocos2d/cocos2d-iphone-extensions
+ *
+ * Copyright (c) 2011 Stepan Generalov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+#ifndef __GAME_CONFIG_H
+#define __GAME_CONFIG_H
+
+//
+// Supported Autorotations:
+// None,
+// UIViewController,
+// CCDirector
+//
+#define kGameAutorotationNone 0
+#define kGameAutorotationCCDirector 1
+#define kGameAutorotationUIViewController 2
+
+//
+// Define here the type of autorotation that you want for your game
+//
+
+// 3rd generation and newer devices: Rotate using UIViewController. Rotation should be supported on iPad apps.
+// TIP:
+// To improve the performance, you should set this value to "kGameAutorotationNone" or "kGameAutorotationCCDirector"
+#if defined(__ARM_NEON__) || TARGET_IPHONE_SIMULATOR
+#define GAME_AUTOROTATION kGameAutorotationUIViewController
+
+// ARMv6 (1st and 2nd generation devices): Don't rotate. It is very expensive
+#elif __arm__
+#define GAME_AUTOROTATION kGameAutorotationNone
+
+
+// Ignore this value on Mac
+#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED)
+
+#else
+#error(unknown architecture)
+#endif
+
+#endif // __GAME_CONFIG_H
+
@@ -0,0 +1,39 @@
+/*
+ * cocos2d-extensions
+ * https://github.com/cocos2d/cocos2d-iphone-extensions
+ *
+ * Copyright (c) 2011 Stepan Generalov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+
+// When you import this file, you import all the cocos2d classes
+#import "cocos2d.h"
+
+// HelloWorldLayer
+@interface HelloWorldLayer : CCLayer
+{
+}
+
+// returns a CCScene that contains the HelloWorldLayer as the only child
++(CCScene *) scene;
+
+@end
@@ -0,0 +1,81 @@
+/*
+ * cocos2d-extensions
+ * https://github.com/cocos2d/cocos2d-iphone-extensions
+ *
+ * Copyright (c) 2011 Stepan Generalov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+
+// Import the interfaces
+#import "HelloWorldLayer.h"
+
+// HelloWorldLayer implementation
+@implementation HelloWorldLayer
+
++(CCScene *) scene
+{
+ // 'scene' is an autorelease object.
+ CCScene *scene = [CCScene node];
+
+ // 'layer' is an autorelease object.
+ HelloWorldLayer *layer = [HelloWorldLayer node];
+
+ // add layer as a child to scene
+ [scene addChild: layer];
+
+ // return the scene
+ return scene;
+}
+
+// on "init" you need to initialize your instance
+-(id) init
+{
+ // always call "super" init
+ // Apple recommends to re-assign "self" with the "super" return value
+ if( (self=[super init])) {
+
+ // create and initialize a Label
+ CCLabelTTF *label = [CCLabelTTF labelWithString:@"Hello World" fontName:@"Marker Felt" fontSize:64];
+
+ // ask director the the window size
+ CGSize size = [[CCDirector sharedDirector] winSize];
+
+ // position the label on the center of the screen
+ label.position = ccp( size.width /2 , size.height/2 );
+
+ // add the label as a child to this Layer
+ [self addChild: label];
+ }
+ return self;
+}
+
+// on "dealloc" you need to release all your retained objects
+- (void) dealloc
+{
+ // in case you have something to dealloc, do it in this method
+ // in this particular example nothing needs to be released.
+ // cocos2d will automatically release all the children (Label)
+
+ // don't forget to call "super dealloc"
+ [super dealloc];
+}
+@end
@@ -0,0 +1,34 @@
+/*
+ * cocos2d-extensions
+ * https://github.com/cocos2d/cocos2d-iphone-extensions
+ *
+ * Copyright (c) 2011 Stepan Generalov
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ */
+
+#import <UIKit/UIKit.h>
+
+
+@interface RootViewController : UIViewController {
+
+}
+
+@end
Oops, something went wrong.

0 comments on commit 03f2c9c

Please sign in to comment.