Oolite
1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
src
SDL
OOSDLJoystickManager.h
Go to the documentation of this file.
1
/*
2
3
OOSDLJoystickManager.h
4
By Dylan Smith
5
6
JoystickHandler handles joystick events from SDL, and translates them
7
into the appropriate action via a lookup table. The lookup table is
8
stored as a simple array rather than an ObjC dictionary since this
9
will be examined fairly often (once per frame during gameplay).
10
11
Conversion methods are provided to convert between the internal
12
representation and an NSDictionary (for loading/saving user defaults
13
and for use in areas where portability/ease of coding are more important
14
than performance such as the GUI)
15
16
Oolite
17
Copyright (C) 2004-2013 Giles C Williams and contributors
18
19
This program is free software; you can redistribute it and/or
20
modify it under the terms of the GNU General Public License
21
as published by the Free Software Foundation; either version 2
22
of the License, or (at your option) any later version.
23
24
This program is distributed in the hope that it will be useful,
25
but WITHOUT ANY WARRANTY; without even the implied warranty of
26
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
GNU General Public License for more details.
28
29
You should have received a copy of the GNU General Public License
30
along with this program; if not, write to the Free Software
31
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
32
MA 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
45
@interface
OOSDLJoystickManager
:
OOJoystickManager
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
OOJoystickManager.h
OOJoystickManager
Definition
OOJoystickManager.h:248
OOSDLJoystickManager
Definition
OOSDLJoystickManager.h:46
OOSDLJoystickManager::stickCount
NSUInteger stickCount
Definition
OOSDLJoystickManager.h:49
OOSDLJoystickManager::stick
SDL_Joystick * stick[MAX_STICKS]
Definition
OOSDLJoystickManager.h:48
Generated by
1.12.0