Adding comments.
authorchsieh <chester.developer@hotmail.com>
Tue, 19 Apr 2011 06:01:02 +0000 (23:01 -0700)
committerchsieh <chester.developer@hotmail.com>
Tue, 19 Apr 2011 06:01:02 +0000 (23:01 -0700)
Littlest.xcodeproj/project.pbxproj
Littlest/AppDelegate.h
Littlest/AppDelegate.mm
Littlest/HelloWorldLayer.h

index cb6088e..16a40b3 100644 (file)
                                4B8CC18F135BFDF900B3E49F /* Release */,
                        );
                        defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
                };
 /* End XCConfigurationList section */
        };
index 6e47755..cb3d749 100644 (file)
@@ -11,8 +11,8 @@
 @class RootViewController;
 
 @interface AppDelegate : NSObject <UIApplicationDelegate> {
-       UIWindow                        *window;
-       RootViewController      *viewController;
+       UIWindow*           window;
+       RootViewController* viewController;
 }
 
 @property (nonatomic, retain) UIWindow *window;
index 14c04c4..440ebf5 100644 (file)
        //
        //
        EAGLView *glView = [EAGLView viewWithFrame:[window bounds]
-                                                                  pixelFormat:kEAGLColorFormatRGB565   // kEAGLColorFormatRGBA8
-                                                                  depthFormat:0                                                // GL_DEPTH_COMPONENT16_OES
-                                               ];
+                                 pixelFormat:kEAGLColorFormatRGBA8
+                                 depthFormat:0                     // GL_DEPTH_COMPONENT16_OES
+                      ];
        
        // attach the openglView to the director
        [director setOpenGLView:glView];
        
-//     // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
-//     if( ! [director enableRetinaDisplay:YES] )
-//             CCLOG(@"Retina Display Not supported");
+       // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices
+  //if( ! [director enableRetinaDisplay:YES] )
+  //   CCLOG(@"Retina Display Not supported");
        
        //
        // VERY IMPORTANT:
        // make the OpenGLView a child of the view controller
        [viewController setView:glView];
        
-       // make the View Controller a child of the main window
+       // make the View in the View Controller a child of the main window
        [window addSubview: viewController.view];
        
+  // this also lets the system know that we're ready to handle events
        [window makeKeyAndVisible];
        
        // Default texture format for PNG/BMP/TIFF/JPEG/GIF images
 }
 
 
+// Pausing
 - (void)applicationWillResignActive:(UIApplication *)application {
        [[CCDirector sharedDirector] pause];
 }
 
+// Resuming
 - (void)applicationDidBecomeActive:(UIApplication *)application {
        [[CCDirector sharedDirector] resume];
 }
 
+// Low on memory
 - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
        [[CCDirector sharedDirector] purgeCachedData];
 }
 
+// Alt-tabbed out? Update but don't render?
 -(void) applicationDidEnterBackground:(UIApplication*)application {
        [[CCDirector sharedDirector] stopAnimation];
 }
 
+// Alt-tabbed in?
 -(void) applicationWillEnterForeground:(UIApplication*)application {
        [[CCDirector sharedDirector] startAnimation];
 }
 
+// Killing
 - (void)applicationWillTerminate:(UIApplication *)application {
        CCDirector *director = [CCDirector sharedDirector];
        
        [director end]; 
 }
 
+// What's this?
 - (void)applicationSignificantTimeChange:(UIApplication *)application {
        [[CCDirector sharedDirector] setNextDeltaTimeZero:YES];
 }
 
+// Killed
 - (void)dealloc {
        [[CCDirector sharedDirector] release];
        [window release];
index ca00e03..1eb1fc8 100644 (file)
@@ -15,8 +15,8 @@
 // HelloWorldLayer
 @interface HelloWorldLayer : CCLayer
 {
-       b2World* world;
-       GLESDebugDraw *m_debugDraw;
+       b2World*        world;
+       GLESDebugDraw*  m_debugDraw;
 }
 
 // returns a CCScene that contains the HelloWorldLayer as the only child