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

Function TelCom_AddCustomKeyEvent

Descent3/TelCom.cpp:4059–4075  ·  view source on GitHub ↗

Adds a custom key event translation mask */

Source from the content-addressed store, hash-verified

4057 Adds a custom key event translation mask
4058*/
4059void TelCom_AddCustomKeyEvent(int key_id, int event_id) {
4060 tCustomKeyEventID *curr = Telcom_custom_key_event_root;
4061
4062 if (!curr) {
4063 curr = Telcom_custom_key_event_root = (tCustomKeyEventID *)mem_malloc(sizeof(tCustomKeyEventID));
4064 } else {
4065 while (curr->next) {
4066 curr = curr->next;
4067 }
4068 curr->next = (tCustomKeyEventID *)mem_malloc(sizeof(tCustomKeyEventID));
4069 curr = curr->next;
4070 }
4071
4072 curr->next = NULL;
4073 curr->event_id = event_id;
4074 curr->key_id = key_id;
4075}
4076
4077/*
4078 Prepares to handle custom keys

Callers 2

TelComMainMenuFunction · 0.85
TelComSingleShipSelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected