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

Function TelComInit

Descent3/TelCom.cpp:566–586  ·  view source on GitHub ↗

Initializes the TelCom system, only to be called once during game initialization

Source from the content-addressed store, hash-verified

564
565// Initializes the TelCom system, only to be called once during game initialization
566void TelComInit(void) {
567 mprintf(0, "Initializing TelCom System\n");
568
569 // load background screens
570 if (!(cfexist(TELCOM_DISPLAY_OGF))) {
571 mprintf(0, "%s file not found, exiting TelCom Init\n", TELCOM_DISPLAY_OGF);
572 return;
573 }
574
575 if (!LoadTelcomBitmap(TELCOM_DISPLAY_OGF, &Telcom_bitmap))
576 Error("Unable to open %s in TelCom system.", TELCOM_DISPLAY_OGF);
577
578 TelCom_init = true;
579
580 // init telcom system structs
581 InitSystems();
582
583 atexit(TelComFree);
584
585 TelcomPageAllIn();
586}
587
588// Cleanup crew, don't worry about calling this guy, it's an atexit() in the init
589void TelComFree() { bm_DestroyChunkedBitmap(&Telcom_bitmap); }

Callers 1

InitGameSystemsFunction · 0.85

Calls 5

cfexistFunction · 0.85
LoadTelcomBitmapFunction · 0.85
ErrorFunction · 0.85
TelcomPageAllInFunction · 0.85
InitSystemsFunction · 0.70

Tested by

no test coverage detected