|
Oolite
|
#include <OOJoystickManager.h>
Class Methods | |
| (id) | + sharedStickHandler |
| (BOOL) | + setStickHandlerClass: |
Protected Attributes | |
| int8_t | axismap [MAX_STICKS][MAX_AXES] |
| int8_t | buttonmap [MAX_STICKS][MAX_BUTTONS] |
| int8_t | guibuttonmap [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 |
| id | cbObject |
| SEL | cbSelector |
| char | cbHardware |
| BOOL | invertPitch |
Private Attributes | |
| OOJoystickAxisProfile * | roll_profile |
| OOJoystickAxisProfile * | pitch_profile |
| OOJoystickAxisProfile * | yaw_profile |
Definition at line 167 of file OOJoystickManager.h.
| - (NSDictionary *) axisFunctions |
Definition at line 283 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 305 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 519 of file OOJoystickManager.m.
References cbHardware, cbObject, clearCallback, and nil.
Referenced by clearCallback, and PlayerEntity(StickMapper)::stickMapperInputHandler:view:.
| - (void) clearMappings |
Definition at line 481 of file OOJoystickManager.m.
References axismap, buttonmap, clearMappings, and STICK_NOFUNCTION.
Referenced by clearMappings, and loadStickSettings.
| - (void) clearStickButtonState: | (int) | stickButton |
Definition at line 503 of file OOJoystickManager.m.
References butstate, and BUTTON_end.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightControls:.
| - (void) clearStickStates |
Definition at line 487 of file OOJoystickManager.m.
References AXIS_end, axstate, butstate, BUTTON_end, clearStickStates, MAX_BUTTONS, MAX_STICKS, STICK_AXISUNASSIGNED, and true_butstate.
Referenced by clearStickStates, PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, PlayerEntity(OOControlsPrivate)::handleKeyboardLayoutKeys, PlayerEntity(OOControlsPrivate)::handleKeyMapperScreenKeys, PlayerEntity(OOControlsPrivate)::handleStickMapperScreenKeys, init, and PlayerEntity(OOControlsPrivate)::pollDemoControls:.
| - (const BOOL *) getAllButtonStates |
Definition at line 103 of file OOJoystickManager.m.
References butstate, and getAllButtonStates.
Referenced by PlayerEntity(LoadSave)::commanderSelector, getAllButtonStates, PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, PlayerEntity(Controls)::handleGUIUpDownArrowKeys, PlayerEntity(KeyMapper)::handleKeyboardLayoutEntryKeys:view:, PlayerEntity(OOControlsPrivate)::handleKeyboardLayoutKeys, PlayerEntity(KeyMapper)::handleKeyConfigKeys:view:, PlayerEntity(KeyMapper)::handleKeyMapperConfirmClearKeys:view:, PlayerEntity(OOControlsPrivate)::handleKeyMapperScreenKeys, PlayerEntity(OOControlsPrivate)::handleStickMapperScreenKeys, PlayerEntity(KeyMapper)::keyMapperInputHandler:view:, PlayerEntity(LoadSave)::overwriteCommanderInputHandler, PlayerEntity(OOControlsPrivate)::pollApplicationControls, PlayerEntity(OOControlsPrivate)::pollAutopilotControls:, PlayerEntity(OOControlsPrivate)::pollCustomViewControls, PlayerEntity(OOControlsPrivate)::pollDemoControls:, PlayerEntity(OOControlsPrivate)::pollDockedControls:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollGuiArrowKeyControls:, PlayerEntity(OOControlsPrivate)::pollMarketScreenControls, PlayerEntity(OOControlsPrivate)::pollViewControls, PlayerEntity(LoadSave)::saveCommanderInputHandler, and PlayerEntity(StickMapper)::stickMapperInputHandler:view:.
| - (double) getAxisState: | (int) | function |
Definition at line 113 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 OOSDLJoystickManager.
Definition at line 593 of file OOJoystickManager.m.
Referenced by OOJoystickManager(Private)::setFunctionForAxis:function:stick:.
| - (BOOL) getButtonState: | (int) | function |
Definition at line 98 of file OOJoystickManager.m.
References butstate.
| - (OOJoystickAxisProfile *) getProfileForAxis: | (int) | axis |
Definition at line 168 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 142 of file OOJoystickManager.m.
References getSensitivity, precisionMode, and STICK_PRECISIONFAC.
Referenced by HeadUpDisplay(Private)::drawStickSensitivityIndicator:, and getSensitivity.
| - (NSDictionary *) guiButtonFunctions |
Definition at line 327 of file OOJoystickManager.m.
References guiButtonFunctions, guibuttonmap, MAX_BUTTONS, and MAX_STICKS.
Referenced by PlayerEntity(StickMapperInternal)::displayFunctionList:skip:, guiButtonFunctions, and saveStickSettings.
| - (id) init |
Reimplemented in OOSDLJoystickManager.
Definition at line 68 of file OOJoystickManager.m.
References clearStickStates, init, invertPitch, loadStickSettings, and precisionMode.
Referenced by init, and OOSDLJoystickManager::init.
Definition at line 108 of file OOJoystickManager.m.
References true_butstate.
| - (NSUInteger) joystickCount |
Reimplemented in OOSDLJoystickManager.
Definition at line 583 of file OOJoystickManager.m.
References joystickCount.
Referenced by joystickCount, listSticks, and PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:.
| - (NSArray *) listSticks |
Definition at line 272 of file OOJoystickManager.m.
References joystickCount, listSticks, and nameOfJoystick:.
Referenced by listSticks, and PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:.
| - (void) loadProfileForAxis: | (int) | axis |
Definition at line 228 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 541 of file OOJoystickManager.m.
References clearMappings, loadProfileForAxis:, loadStickSettings, setDefaultMapping, and setFunction:withDict:.
Referenced by init, and loadStickSettings.
| - (NSString *) nameOfJoystick: | (NSUInteger) | stickNumber |
Reimplemented in OOSDLJoystickManager.
Definition at line 588 of file OOJoystickManager.m.
Referenced by listSticks.
| - (NSPoint) rollPitchAxis |
Definition at line 88 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 181 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 525 of file OOJoystickManager.m.
References axisFunctions, buttonFunctions, guiButtonFunctions, 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 510 of file OOJoystickManager.m.
References cbHardware, cbObject, and cbSelector.
Referenced by PlayerEntity(StickMapper)::stickMapperInputHandler:view:.
| - (void) setDefaultMapping |
Definition at line 470 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 349 of file OOJoystickManager.m.
References BUTTON_GUILEFT, BUTTON_GUISELECT, setFunctionForAxis:function:stick:, setFunctionForButton:function:stick:, and setGuiFunctionForButton:function:stick:.
Referenced by loadStickSettings, and PlayerEntity(StickMapper)::updateFunction:.
|
implementation |
Provided by category OOJoystickManager(Private).
Definition at line 374 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 394 of file OOJoystickManager.m.
References MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
Referenced by setFunction:withDict:.
|
implementation |
Definition at line 412 of file OOJoystickManager.m.
References guibuttonmap, MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
Referenced by setFunction:withDict:.
| - (void) setProfile: | (OOJoystickAxisProfile*) | profile | |
| forAxis: | (int) | axis |
Definition at line 147 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 59 of file OOJoystickManager.m.
References nil, and sStickHandlerClass.
Referenced by GameController::applicationDidFinishLaunching:, and MyOpenGLView::init.
| + (id) sharedStickHandler |
Definition at line 49 of file OOJoystickManager.m.
References nil, sharedStickHandler, sSharedStickHandler, and sStickHandlerClass.
Referenced by PlayerEntity(LoadSave)::commanderSelector, PlayerEntity(StickMapperInternal)::displayFunctionList:skip:, HeadUpDisplay(Private)::drawStickSensitivityIndicator:, PlayerEntity(OOControlsPrivate)::handleGameOptionsScreenKeys, PlayerEntity(Controls)::handleGUIUpDownArrowKeys, PlayerEntity(KeyMapper)::handleKeyboardLayoutEntryKeys:view:, PlayerEntity(OOControlsPrivate)::handleKeyboardLayoutKeys, PlayerEntity(KeyMapper)::handleKeyConfigKeys:view:, PlayerEntity(KeyMapper)::handleKeyMapperConfirmClearKeys:view:, PlayerEntity(OOControlsPrivate)::handleKeyMapperScreenKeys, PlayerEntity(OOControlsPrivate)::handleStickMapperScreenKeys, StickProfileScreen::init, Universe::initWithGameView:, PlayerEntity(KeyMapper)::keyMapperInputHandler:view:, PlayerEntity(LoadSave)::overwriteCommanderInputHandler, PlayerEntity(OOControlsPrivate)::pollApplicationControls, PlayerEntity(OOControlsPrivate)::pollAutopilotControls:, MyOpenGLView(Input)::pollControls, PlayerEntity(OOControlsPrivate)::pollCustomViewControls, PlayerEntity(OOControlsPrivate)::pollDemoControls:, PlayerEntity(OOControlsPrivate)::pollDockedControls:, PlayerEntity(OOControlsPrivate)::pollFlightArrowKeyControls:, PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollGuiArrowKeyControls:, PlayerEntity(OOControlsPrivate)::pollMarketScreenControls, PlayerEntity(OOControlsPrivate)::pollViewControls, PlayerEntity(StickMapperInternal)::removeFunction:, PlayerEntity(LoadSave)::saveCommanderInputHandler, PlayerEntity(StickMapper)::setGuiToStickMapperScreen:resetCurrentRow:, sharedStickHandler, PlayerEntity(StickMapper)::stickMapperInputHandler:view:, and PlayerEntity(StickMapper)::updateFunction:.
| - (void) unsetAxisFunction: | (int) | function |
Definition at line 430 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 444 of file OOJoystickManager.m.
References buttonmap, MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
Referenced by PlayerEntity(StickMapperInternal)::removeFunction:, and PlayerEntity(StickMapper)::updateFunction:.
| - (void) unsetGuiButtonFunction: | (int) | function |
Definition at line 457 of file OOJoystickManager.m.
References guibuttonmap, MAX_BUTTONS, MAX_STICKS, and STICK_NOFUNCTION.
| - (NSPoint) viewAxis |
Definition at line 93 of file OOJoystickManager.m.
References AXIS_VIEWX, AXIS_VIEWY, axstate, and viewAxis.
Referenced by PlayerEntity(OOControlsPrivate)::pollFlightControls:, PlayerEntity(OOControlsPrivate)::pollViewControls, and viewAxis.
|
protected |
Definition at line 169 of file OOJoystickManager.h.
Referenced by axisFunctions, clearMappings, OOSDLJoystickManager::decodeAxisEvent:, setDefaultMapping, and unsetAxisFunction:.
|
protected |
Definition at line 173 of file OOJoystickManager.h.
Referenced by clearStickStates, OOSDLJoystickManager::decodeAxisEvent:, getAxisState:, unsetAxisFunction:, and viewAxis.
|
protected |
Definition at line 174 of file OOJoystickManager.h.
Referenced by clearStickButtonState:, clearStickStates, OOSDLJoystickManager::decodeButtonEvent:, getAllButtonStates, and getButtonState:.
|
protected |
Definition at line 170 of file OOJoystickManager.h.
Referenced by buttonFunctions, clearMappings, OOSDLJoystickManager::decodeButtonEvent:, setDefaultMapping, and unsetButtonFunction:.
|
protected |
Definition at line 182 of file OOJoystickManager.h.
Referenced by clearCallback, OOSDLJoystickManager::decodeAxisEvent:, OOSDLJoystickManager::decodeButtonEvent:, and setCallback:object:hardware:.
|
protected |
Definition at line 180 of file OOJoystickManager.h.
Referenced by clearCallback, OOSDLJoystickManager::decodeAxisEvent:, OOSDLJoystickManager::decodeButtonEvent:, and setCallback:object:hardware:.
|
protected |
Definition at line 181 of file OOJoystickManager.h.
Referenced by setCallback:object:hardware:.
|
protected |
Definition at line 171 of file OOJoystickManager.h.
Referenced by OOSDLJoystickManager::decodeButtonEvent:, guiButtonFunctions, setGuiFunctionForButton:function:stick:, and unsetGuiButtonFunction:.
|
protected |
Definition at line 175 of file OOJoystickManager.h.
Referenced by OOSDLJoystickManager::decodeHatEvent:.
|
protected |
Definition at line 183 of file OOJoystickManager.h.
Referenced by OOSDLJoystickManager::decodeAxisEvent:, and init.
|
private |
Definition at line 187 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.
|
protected |
Definition at line 176 of file OOJoystickManager.h.
Referenced by OOSDLJoystickManager::decodeButtonEvent:, getAxisState:, getSensitivity, and init.
|
private |
Definition at line 186 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.
|
protected |
Definition at line 172 of file OOJoystickManager.h.
Referenced by clearStickStates, OOSDLJoystickManager::decodeButtonEvent:, and isButtonDown:stick:.
|
private |
Definition at line 188 of file OOJoystickManager.h.
Referenced by getProfileForAxis:, and setProfile:forAxis:.