annotate Xcode/TemplatesForXcode/SDL Custom Cocoa Application/MyController.h @ 2215:23a2cb765052

make indent
author Bob Pendleton <bob@pendleton.com>
date Wed, 25 Jul 2007 21:23:28 +0000
parents 59a667370c57
children 4d2d0548f5b2
rev   line source
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 // MyController.h
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 // SDL Custom Cocoa App
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 // Created by Darrell Walisser on Fri Jul 18 2003.
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 #import <Cocoa/Cocoa.h>
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 #import "SDL.h"
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
12 extern id gController; // instance of this class from nib
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 // Declare SDL_QuartzWindowDelegate (defined in SDL.framework)
2215
23a2cb765052 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2213
diff changeset
15 @interface SDL_QuartzWindowDelegate: NSObject @ end @ interface MyController:NSObject
23a2cb765052 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2213
diff changeset
16 {
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 // Interface Builder Outlets
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
18 IBOutlet id _framesPerSecond;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
19 IBOutlet id _numSprites;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
20 IBOutlet id _window;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
21 IBOutlet id _view;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
22
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 // Private instance variables
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
24 int _nSprites;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
25 int _max_speed;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
26 int _doFlip;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
27 Uint8 *_mem;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
28
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
29 SDL_Surface *_screen;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
30 SDL_Surface *_sprite;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
31 SDL_Rect *_sprite_rects;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
32 SDL_Rect *_positions;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
33 SDL_Rect *_velocities;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
34 int _sprites_visible;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
35 Uint16 _sprite_w, _sprite_h;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
36
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
37 int _mouse_x, _mouse_y;
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 }
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
39
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
40 // Interface Builder Actions
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
41 -(IBAction) changeNumberOfSprites:(id) sender;
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
42 -(IBAction) selectUpdateMode:(id) sender;
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
43 @end