Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
46 lines (38 loc) · 1.07 KB

File metadata and controls

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