-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
5,501 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// | ||
// Prefix header for all source files of the 'cocos2d-mac' target in the 'cocos2d-mac' project | ||
// | ||
|
||
#ifdef __OBJC__ | ||
#import <Cocoa/Cocoa.h> | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* Localized versions of Info.plist keys */ | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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.iplayful.${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> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// AppDelegate.h | ||
// tiny-wings-mac | ||
// | ||
// Created by Sergey Tikhonov on 15.12.11. | ||
// Copyright iPlayful Inc. 2011. All rights reserved. | ||
// | ||
|
||
#import "cocos2d.h" | ||
|
||
@interface tiny_wings_macAppDelegate : NSObject <NSApplicationDelegate> | ||
{ | ||
NSWindow *window_; | ||
MacGLView *glView_; | ||
} | ||
|
||
@property (assign) IBOutlet NSWindow *window; | ||
@property (assign) IBOutlet MacGLView *glView; | ||
|
||
- (IBAction)toggleFullScreen:(id)sender; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// | ||
// AppDelegate.m | ||
// tiny-wings-mac | ||
// | ||
// Created by Sergey Tikhonov on 15.12.11. | ||
// Copyright iPlayful Inc. 2011. All rights reserved. | ||
// | ||
|
||
#import "AppDelegate.h" | ||
#import "GameLayer.h" | ||
|
||
@implementation tiny_wings_macAppDelegate | ||
@synthesize window=window_, glView=glView_; | ||
|
||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | ||
{ | ||
CCDirectorMac *director = (CCDirectorMac*) [CCDirector sharedDirector]; | ||
|
||
[director setDisplayFPS:YES]; | ||
|
||
[director setOpenGLView:glView_]; | ||
|
||
// EXPERIMENTAL stuff. | ||
// 'Effects' don't work correctly when autoscale is turned on. | ||
// Use kCCDirectorResize_NoScale if you don't want auto-scaling. | ||
[director setResizeMode:kCCDirectorResize_AutoScale]; | ||
|
||
// Enable "moving" mouse event. Default no. | ||
[window_ setAcceptsMouseMovedEvents:NO]; | ||
|
||
[director runWithScene:[GameLayer scene]]; | ||
} | ||
|
||
- (BOOL) applicationShouldTerminateAfterLastWindowClosed: (NSApplication *) theApplication | ||
{ | ||
return YES; | ||
} | ||
|
||
- (void)dealloc | ||
{ | ||
[[CCDirector sharedDirector] end]; | ||
[window_ release]; | ||
[super dealloc]; | ||
} | ||
|
||
#pragma mark AppDelegate - IBActions | ||
|
||
- (IBAction)toggleFullScreen: (id)sender | ||
{ | ||
CCDirectorMac *director = (CCDirectorMac*) [CCDirector sharedDirector]; | ||
[director setFullScreen: ! [director isFullScreen] ]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// main.m | ||
// cocos2d-mac | ||
// | ||
// Created by Ricardo Quesada on 8/17/10. | ||
// Copyright 2010 __MyCompanyName__. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
#import "cocos2d.h" | ||
|
||
int main(int argc, char *argv[]) | ||
{ | ||
[MacGLView load_]; | ||
return NSApplicationMain(argc, (const char **) argv); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.