Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyController.h
author Sam Lantinga <slouken@libsdl.org>
Sat, 11 Aug 2007 18:51:12 +0000
changeset 2220 4d2d0548f5b2
parent 2215 23a2cb765052
permissions -rw-r--r--
Don't run indent on the Xcode templates
slouken@2207
     1
//
slouken@2207
     2
//  MyController.h
slouken@2207
     3
//  SDL Custom Cocoa App
slouken@2207
     4
//
slouken@2207
     5
//  Created by Darrell Walisser on Fri Jul 18 2003.
slouken@2207
     6
//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
slouken@2207
     7
//
slouken@2207
     8
slouken@2207
     9
#import <Cocoa/Cocoa.h>
slouken@2207
    10
#import "SDL.h"
slouken@2207
    11
slouken@2220
    12
extern id gController; // instance of this class from nib
slouken@2207
    13
slouken@2207
    14
// Declare SDL_QuartzWindowDelegate (defined in SDL.framework)
slouken@2220
    15
@interface SDL_QuartzWindowDelegate : NSObject
slouken@2220
    16
@end
slouken@2220
    17
slouken@2220
    18
@interface MyController : NSObject
bob@2215
    19
{
bob@2213
    20
    // Interface Builder Outlets
slouken@2220
    21
    IBOutlet id 	_framesPerSecond;
slouken@2220
    22
    IBOutlet id 	_numSprites;
slouken@2220
    23
    IBOutlet id 	_window;
slouken@2220
    24
    IBOutlet id 	_view;
slouken@2220
    25
    
slouken@2220
    26
    // Private instance variables
slouken@2220
    27
    int          _nSprites;
slouken@2220
    28
    int          _max_speed;
slouken@2220
    29
    int          _doFlip;
slouken@2220
    30
    Uint8*       _mem;
slouken@2220
    31
    
slouken@2220
    32
    SDL_Surface* _screen;
slouken@2220
    33
    SDL_Surface* _sprite;
slouken@2220
    34
    SDL_Rect*    _sprite_rects;
slouken@2220
    35
    SDL_Rect*    _positions;
slouken@2220
    36
    SDL_Rect*    _velocities;
slouken@2220
    37
    int          _sprites_visible;
slouken@2220
    38
    Uint16       _sprite_w, _sprite_h;
slouken@2220
    39
    
slouken@2220
    40
    int 		 _mouse_x, _mouse_y;
slouken@2220
    41
}
slouken@2220
    42
// Interface Builder Actions
slouken@2220
    43
- (IBAction)changeNumberOfSprites:(id)sender;
slouken@2220
    44
- (IBAction)selectUpdateMode:(id)sender;
slouken@2220
    45
@end
bob@2213
    46