Xcode/TemplatesForXcode/SDL Custom Cocoa Application/MyController.h
changeset 2207 d63e9f5944ae
child 2213 59a667370c57
equal deleted inserted replaced
2206:ca7d2227d630 2207:d63e9f5944ae
       
     1 //
       
     2 //  MyController.h
       
     3 //  SDL Custom Cocoa App
       
     4 //
       
     5 //  Created by Darrell Walisser on Fri Jul 18 2003.
       
     6 //  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
       
     7 //
       
     8 
       
     9 #import <Cocoa/Cocoa.h>
       
    10 #import "SDL.h"
       
    11 
       
    12 extern id gController; // instance of this class from nib
       
    13 
       
    14 // Declare SDL_QuartzWindowDelegate (defined in SDL.framework)
       
    15 @interface SDL_QuartzWindowDelegate : NSObject
       
    16 @end
       
    17 
       
    18 @interface MyController : NSObject
       
    19 {
       
    20     // Interface Builder Outlets
       
    21     IBOutlet id 	_framesPerSecond;
       
    22     IBOutlet id 	_numSprites;
       
    23     IBOutlet id 	_window;
       
    24     IBOutlet id 	_view;
       
    25     
       
    26     // Private instance variables
       
    27     int          _nSprites;
       
    28     int          _max_speed;
       
    29     int          _doFlip;
       
    30     Uint8*       _mem;
       
    31     
       
    32     SDL_Surface* _screen;
       
    33     SDL_Surface* _sprite;
       
    34     SDL_Rect*    _sprite_rects;
       
    35     SDL_Rect*    _positions;
       
    36     SDL_Rect*    _velocities;
       
    37     int          _sprites_visible;
       
    38     Uint16       _sprite_w, _sprite_h;
       
    39     
       
    40     int 		 _mouse_x, _mouse_y;
       
    41 }
       
    42 // Interface Builder Actions
       
    43 - (IBAction)changeNumberOfSprites:(id)sender;
       
    44 - (IBAction)selectUpdateMode:(id)sender;
       
    45 @end
       
    46