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

Function TelComSendEvent

Descent3/TelCom.cpp:2462–2474  ·  view source on GitHub ↗

* Calling this sends an event message to the TelCom, adding it to it's event queue * */

Source from the content-addressed store, hash-verified

2460 *
2461 */
2462void TelComSendEvent(int event_num, int parm1, int parm2) {
2463 for (int i = 0; i < MAX_TELCOM_EVENTS; i++) {
2464 if (Telcom_system.Telcom_event_queue[i].id == -1) {
2465 // add the event here
2466 Telcom_system.Telcom_event_queue[i].id = event_num;
2467 Telcom_system.Telcom_event_queue[i].parms[0] = parm1;
2468 Telcom_system.Telcom_event_queue[i].parms[1] = parm2;
2469 return;
2470 }
2471 }
2472
2473 mprintf(0, "Warning: TelCom Event Queue Overflow\n");
2474}
2475
2476/*
2477 * Call this when handling the TelCom system events, returns true if there is an event waiting, it will then fill

Callers 4

TelComMainMenuFunction · 0.85
TelComHandleKeyPressFunction · 0.85
TelComSingleShipSelectFunction · 0.85
RenderButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected