MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / get_controller_function

Method get_controller_function

linux/lnxcontroller.cpp:478–485  ·  view source on GitHub ↗

returns information about a requested function (type must be of an array == CTLBINDS_PER_FUNC)

Source from the content-addressed store, hash-verified

476
477// returns information about a requested function (type must be of an array == CTLBINDS_PER_FUNC)
478void lnxgameController::get_controller_function(int id, ct_type *type, ct_config_data *value, uint8_t *flags) {
479 type[0] = m_ElementList[id].ctype[0];
480 type[1] = m_ElementList[id].ctype[1];
481 *value = makeword(CONTROLLER_CTL_INFO(m_ElementList[id].ctl[0], m_ElementList[id].ctl[1]),
482 CONTROLLER_CTL_VALUE(m_ElementList[id].value[0], m_ElementList[id].value[1]));
483 flags[0] = m_ElementList[id].flags[0];
484 flags[1] = m_ElementList[id].flags[1];
485}
486
487// temporarily enables or disables a function
488void lnxgameController::enable_function(int id, bool enable) { m_ElementList[id].enabled = enable; }

Callers 13

SaveControlConfigFunction · 0.45
PilotCreateFunction · 0.45
_ReadOldPilotFileFunction · 0.45
initializeMethod · 0.45
read_controlsMethod · 0.45
GetControllerBindingTextFunction · 0.45
GetKeyBindingTextFunction · 0.45
setupMethod · 0.45
OnDrawMethod · 0.45
OnKeyDownMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected