Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOSDLJoystickManager.h
Go to the documentation of this file.
1/*
2
3OOSDLJoystickManager.h
4By Dylan Smith
5
6JoystickHandler handles joystick events from SDL, and translates them
7into the appropriate action via a lookup table. The lookup table is
8stored as a simple array rather than an ObjC dictionary since this
9will be examined fairly often (once per frame during gameplay).
10
11Conversion methods are provided to convert between the internal
12representation and an NSDictionary (for loading/saving user defaults
13and for use in areas where portability/ease of coding are more important
14than performance such as the GUI)
15
16Oolite
17Copyright (C) 2004-2013 Giles C Williams and contributors
18
19This program is free software; you can redistribute it and/or
20modify it under the terms of the GNU General Public License
21as published by the Free Software Foundation; either version 2
22of the License, or (at your option) any later version.
23
24This program is distributed in the hope that it will be useful,
25but WITHOUT ANY WARRANTY; without even the implied warranty of
26MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27GNU General Public License for more details.
28
29You should have received a copy of the GNU General Public License
30along with this program; if not, write to the Free Software
31Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
32MA 02110-1301, USA.
33
34*/
35
36
37
38#import <Foundation/Foundation.h>
39#import <SDL.h>
40#import "OOJoystickManager.h"
41
42
43
44
46{
47@private
48 SDL_Joystick *stick[MAX_STICKS];
49 NSUInteger stickCount;
50}
51
52- (id) init;
53- (BOOL) handleSDLEvent: (SDL_Event *)evt;
54- (NSString *) nameOfJoystick:(NSUInteger)stickNumber;
55- (int16_t) getAxisWithStick:(NSUInteger) stickNum axis:(NSUInteger) axisNum ;
56
57@end
SDL_Joystick * stick[MAX_STICKS]