![]() |
Oolite 1.91.0.7659-250410-0031890
|
#include <OOJoystickManager.h>
Class Methods | |
(id) | + sharedStickHandler |
(BOOL) | + setStickHandlerClass: |
Private Attributes | |
int8_t | axismap [MAX_STICKS][MAX_AXES] |
int8_t | buttonmap [MAX_STICKS][MAX_BUTTONS] |
BOOL | true_butstate [MAX_STICKS][MAX_BUTTONS] |
double | axstate [AXIS_end] |
BOOL | butstate [BUTTON_end] |
uint8_t | hatstate [MAX_STICKS][MAX_HATS] |
BOOL | precisionMode |
OOJoystickAxisProfile * | roll_profile |
OOJoystickAxisProfile * | pitch_profile |
OOJoystickAxisProfile * | yaw_profile |
id | cbObject |
SEL | cbSelector |
char | cbHardware |
BOOL | invertPitch |
Definition at line 247 of file OOJoystickManager.h.
- (NSDictionary *) axisFunctions |
Definition at line 338 of file OOJoystickManager.m.
References axisFunctions, axismap, MAX_AXES, and MAX_STICKS.
Referenced by axisFunctions, PlayerEntity(StickMapperInternal)::displayFunctionList:skip:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, and saveStickSettings.
- (NSDictionary *) buttonFunctions |
Definition at line 364 of file OOJoystickManager.m.
References buttonFunctions, buttonmap, MAX_BUTTONS, and MAX_STICKS.
Referenced by buttonFunctions, PlayerEntity(StickMapperInternal)::displayFunctionList:skip:, and saveStickSettings.
- (void) clearCallback |
Definition at line 551 of file OOJoystickManager.m.
References cbHardware, cbObject, clearCallback, and nil.
Referenced by clearCallback, and PlayerEntity(StickMapper)::stickMapperInputHandler:view:.
- (void) clearMappings |
Definition at line 504 of file OOJoystickManager.m.
References axismap, buttonmap, clearMappings, and STICK_NOFUNCTION.
Referenced by clearMappings, and loadStickSettings.
- (void) clearStickButtonState: | (int) | stickButton |
Definition at line 532 of file OOJoystickManager.m.
References butstate, and BUTTON_end.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightControls:.
- (void) clearStickStates |
Definition at line 511 of file OOJoystickManager.m.
References AXIS_end, axstate, butstate, BUTTON_end, clearStickStates, MAX_BUTTONS, MAX_STICKS, STICK_AXISUNASSIGNED, and true_butstate.
Referenced by clearStickStates, and init.
- (void) decodeAxisEvent: | (JoyAxisEvent *) | evt |
Definition at line 558 of file OOJoystickManager.m.
References AXCBTHRESH, JoyAxisEvent::axis, AXIS_PITCH, AXIS_ROLL, AXIS_THRUST, AXIS_VIEWX, AXIS_VIEWY, AXIS_YAW, axismap, axstate, cbHardware, cbObject, HW_AXIS, invertPitch, MAX_AXES, nil, OOLog, STICK_NOFUNCTION, STICK_NORMALDIV, JoyAxisEvent::value, and JoyAxisEvent::which.
Referenced by OOMacJoystickManager::handleInputEvent:, and OOSDLJoystickManager::handleSDLEvent:.
- (void) decodeButtonEvent: | (JoyButtonEvent *) | evt |
Definition at line 626 of file OOJoystickManager.m.
References butstate, BUTTON_PRECISION, buttonmap, cbHardware, cbObject, HW_BUTTON, JOYBUTTONDOWN, MAX_BUTTONS, nil, OOLog, precisionMode, true_butstate, JoyAxisEvent::type, and JoyAxisEvent::which.
Referenced by decodeHatEvent:, OOMacJoystickManager::handleInputEvent:, and OOSDLJoystickManager::handleSDLEvent:.
- (void) decodeHatEvent: | (JoyHatEvent *) | evt |
Definition at line 672 of file OOJoystickManager.m.
References JoyButtonEvent::button, decodeButtonEvent:, hatstate, JOYBUTTON_PRESSED, JOYBUTTON_RELEASED, JOYBUTTONDOWN, JOYBUTTONUP, MAX_REAL_BUTTONS, JoyButtonEvent::state, JoyButtonEvent::type, JoyAxisEvent::value, JoyAxisEvent::which, and JoyButtonEvent::which.
Referenced by OOMacJoystickManager::handleInputEvent:, and OOSDLJoystickManager::handleSDLEvent:.
- (const BOOL *) getAllButtonStates |
Definition at line 115 of file OOJoystickManager.m.
References butstate, and getAllButtonStates.
Referenced by getAllButtonStates, PlayerEntity(OOControlsPrivate)::pollApplicationControls, PlayerEntity(OOControlsPrivate)::pollAutopilotControls:, PlayerEntity(OOControlsPrivate)::pollCustomViewControls, PlayerEntity(OOControlsPrivate)::pollDockedControls:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, and PlayerEntity(OOControlsPrivate)::pollViewControls.
- (double) getAxisState: | (int) | function |
Definition at line 125 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, AXIS_YAW, axstate, precisionMode, STICK_AXISUNASSIGNED, STICK_PRECISIONFAC, and OOJoystickAxisProfile::value:.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:, and PlayerEntity(OOControlsPrivate)::pollFlightControls:.
- (int16_t) getAxisWithStick: | (NSUInteger) | stickNum | |
axis: | (NSUInteger) | axisNum |
Reimplemented in OOMacJoystickManager, and OOSDLJoystickManager.
Definition at line 760 of file OOJoystickManager.m.
Referenced by OOJoystickManager(Private)::setFunctionForAxis:function:stick:.
- (BOOL) getButtonState: | (int) | function |
Definition at line 109 of file OOJoystickManager.m.
References butstate.
- (OOJoystickAxisProfile *) getProfileForAxis: | (int) | axis |
Definition at line 193 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, AXIS_YAW, nil, pitch_profile, roll_profile, and yaw_profile.
Referenced by StickProfileScreen::deleteSelected, StickProfileScreen::mouseDown:, and saveProfileForAxis:.
- (double) getSensitivity |
Definition at line 166 of file OOJoystickManager.m.
References getSensitivity, precisionMode, and STICK_PRECISIONFAC.
Referenced by HeadUpDisplay(Private)::drawStickSensitivityIndicator:, and getSensitivity.
- (id) init |
Reimplemented in OOMacJoystickManager, and OOSDLJoystickManager.
Definition at line 74 of file OOJoystickManager.m.
References clearStickStates, init, invertPitch, loadStickSettings, and precisionMode.
Referenced by init, and OOSDLJoystickManager::init.
Definition at line 120 of file OOJoystickManager.m.
References true_butstate.
- (NSUInteger) joystickCount |
Reimplemented in OOMacJoystickManager, and OOSDLJoystickManager.
Definition at line 695 of file OOJoystickManager.m.
References joystickCount.
Referenced by joystickCount, listSticks, and PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:.
- (NSArray *) listSticks |
Definition at line 325 of file OOJoystickManager.m.
References joystickCount, listSticks, and nameOfJoystick:.
Referenced by listSticks, and PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:.
- (void) loadProfileForAxis: | (int) | axis |
Definition at line 267 of file OOJoystickManager.m.
References OOJoystickSplineAxisProfile::addControl:, AXIS_PITCH, AXIS_ROLL, AXIS_YAW, count, OOJoystickAxisProfile::setDeadzone:, OOJoystickStandardAxisProfile::setParameter:, OOJoystickStandardAxisProfile::setPower:, and setProfile:forAxis:.
Referenced by loadStickSettings.
- (void) loadStickSettings |
Definition at line 716 of file OOJoystickManager.m.
References clearMappings, loadProfileForAxis:, loadStickSettings, setDefaultMapping, and setFunction:withDict:.
Referenced by init, and loadStickSettings.
- (NSString *) nameOfJoystick: | (NSUInteger) | stickNumber |
Reimplemented in OOMacJoystickManager, and OOSDLJoystickManager.
Definition at line 755 of file OOJoystickManager.m.
Referenced by listSticks.
- (NSPoint) rollPitchAxis |
Definition at line 97 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, and rollPitchAxis.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:, and rollPitchAxis.
- (void) saveProfileForAxis: | (int) | axis |
Definition at line 208 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, AXIS_YAW, OOJoystickSplineAxisProfile::controlPoints, OOJoystickAxisProfile::deadzone, getProfileForAxis:, OOJoystickStandardAxisProfile::parameter, and OOJoystickStandardAxisProfile::power.
Referenced by saveStickSettings.
- (void) saveStickSettings |
Definition at line 701 of file OOJoystickManager.m.
References axisFunctions, buttonFunctions, saveProfileForAxis:, and saveStickSettings.
Referenced by StickProfileScreen::deleteSelected, StickProfileScreen::mouseDown:, PlayerEntity(StickMapperInternal)::removeFunction:, saveStickSettings, and PlayerEntity(StickMapper)::updateFunction:.
- (void) setCallback: | (SEL) | selector | |
object: | (id) | obj | |
hardware: | (char) | hwflags |
Definition at line 541 of file OOJoystickManager.m.
References cbHardware, cbObject, and cbSelector.
Referenced by PlayerEntity(StickMapper)::stickMapperInputHandler:view:.
- (void) setDefaultMapping |
Definition at line 492 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, axismap, BUTTON_FIRE, BUTTON_LAUNCHMISSILE, buttonmap, and setDefaultMapping.
Referenced by loadStickSettings, and setDefaultMapping.
- (void) setFunction: | (int) | function | |
withDict: | (NSDictionary *) | stickFn |
Definition at line 390 of file OOJoystickManager.m.
References setFunctionForAxis:function:stick:, and setFunctionForButton:function:stick:.
Referenced by loadStickSettings, and PlayerEntity(StickMapper)::updateFunction:.
|
implementation |
Provided by category OOJoystickManager(Private).
Definition at line 411 of file OOJoystickManager.m.
References AXIS_THRUST, getAxisWithStick:axis:, MAX_AXES, MAX_STICKS, STICK_NORMALDIV, and unsetAxisFunction:.
Referenced by setFunction:withDict:.
|
implementation |
Provided by category OOJoystickManager(Private).
Definition at line 435 of file OOJoystickManager.m.
References MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
Referenced by setFunction:withDict:.
- (void) setProfile: | (OOJoystickAxisProfile *) | profile | |
forAxis: | (int) | axis |
Definition at line 171 of file OOJoystickManager.m.
References AXIS_PITCH, AXIS_ROLL, AXIS_YAW, pitch_profile, roll_profile, and yaw_profile.
Referenced by loadProfileForAxis:.
+ (BOOL) setStickHandlerClass: | (Class) | aClass |
Definition at line 64 of file OOJoystickManager.m.
References nil, and sStickHandlerClass.
Referenced by GameController::applicationDidFinishLaunching:, and MyOpenGLView::init.
+ (id) sharedStickHandler |
Definition at line 53 of file OOJoystickManager.m.
References nil, sharedStickHandler, sSharedStickHandler, and sStickHandlerClass.
Referenced by PlayerEntity(StickMapperInternal)::displayFunctionList:skip:, HeadUpDisplay(Private)::drawStickSensitivityIndicator:, StickProfileScreen::init, Universe::initWithGameView:, PlayerEntity(OOControlsPrivate)::pollApplicationControls, PlayerEntity(OOControlsPrivate)::pollAutopilotControls:, MyOpenGLView::pollControls, PlayerEntity(OOControlsPrivate)::pollCustomViewControls, PlayerEntity(OOControlsPrivate)::pollDockedControls:, PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollViewControls, PlayerEntity(StickMapperInternal)::removeFunction:, PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:, sharedStickHandler, PlayerEntity(StickMapper)::stickMapperInputHandler:view:, and PlayerEntity(StickMapper)::updateFunction:.
- (void) unsetAxisFunction: | (int) | function |
Definition at line 457 of file OOJoystickManager.m.
References axismap, axstate, MAX_AXES, MAX_STICKS, STICK_AXISUNASSIGNED, and STICK_NOFUNCTION.
Referenced by PlayerEntity(StickMapperInternal)::removeFunction:, OOJoystickManager(Private)::setFunctionForAxis:function:stick:, and PlayerEntity(StickMapper)::updateFunction:.
- (void) unsetButtonFunction: | (int) | function |
Definition at line 475 of file OOJoystickManager.m.
References buttonmap, MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
Referenced by PlayerEntity(StickMapperInternal)::removeFunction:, and PlayerEntity(StickMapper)::updateFunction:.
- (NSPoint) viewAxis |
Definition at line 103 of file OOJoystickManager.m.
References AXIS_VIEWX, AXIS_VIEWY, axstate, and viewAxis.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollViewControls, and viewAxis.
|
private |
Definition at line 251 of file OOJoystickManager.h.
Referenced by axisFunctions, clearMappings, decodeAxisEvent:, setDefaultMapping, and unsetAxisFunction:.
|
private |
Definition at line 254 of file OOJoystickManager.h.
Referenced by clearStickStates, decodeAxisEvent:, getAxisState:, unsetAxisFunction:, and viewAxis.
|
private |
Definition at line 255 of file OOJoystickManager.h.
Referenced by clearStickButtonState:, clearStickStates, decodeButtonEvent:, getAllButtonStates, and getButtonState:.
|
private |
Definition at line 252 of file OOJoystickManager.h.
Referenced by buttonFunctions, clearMappings, decodeButtonEvent:, setDefaultMapping, and unsetButtonFunction:.
|
private |
Definition at line 266 of file OOJoystickManager.h.
Referenced by clearCallback, decodeAxisEvent:, decodeButtonEvent:, and setCallback:object:hardware:.
|
private |
Definition at line 264 of file OOJoystickManager.h.
Referenced by clearCallback, decodeAxisEvent:, decodeButtonEvent:, and setCallback:object:hardware:.
|
private |
Definition at line 265 of file OOJoystickManager.h.
Referenced by setCallback:object:hardware:.
|
private |
Definition at line 256 of file OOJoystickManager.h.
Referenced by decodeHatEvent:.
|
private |
Definition at line 267 of file OOJoystickManager.h.
Referenced by decodeAxisEvent:, and init.
|
private |
Definition at line 259 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.
|
private |
Definition at line 257 of file OOJoystickManager.h.
Referenced by decodeButtonEvent:, getAxisState:, getSensitivity, and init.
|
private |
Definition at line 258 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.
|
private |
Definition at line 253 of file OOJoystickManager.h.
Referenced by clearStickStates, decodeButtonEvent:, and isButtonDown:stick:.
|
private |
Definition at line 260 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.