MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DLLFUNCCALL DLLMultiCall

Function DLLFUNCCALL DLLMultiCall

netcon/mtclient/mtclient.cpp:694–834  ·  view source on GitHub ↗

The main entry point where the game calls the dll

Source from the content-addressed store, hash-verified

692
693// The main entry point where the game calls the dll
694void DLLFUNCCALL DLLMultiCall(int eventnum) {
695 // We don't need eventnum right now.
696
697 switch (eventnum) {
698 case MT_EVT_GET_HELP:
699 strcpy(DLLHelpText1, TXT_PXO_HELP1);
700 strcpy(DLLHelpText2, TXT_PXO_HELP2);
701 strcpy(DLLHelpText3, TXT_PXO_HELP3);
702 strcpy(DLLHelpText4, TXT_PXO_HELP4);
703 break;
704 case MT_EVT_LOGIN:
705 DLLDatabaseReadInt("BypassChat", &Bypass_chat);
706 if (!DLLTCP_active) {
707 DLLDoMessageBox(TXT_PXO_ERROR, TXT_PXO_NO_TCPIP, MSGBOX_OK, UICOL_WINDOW_TITLE, UICOL_TEXT_NORMAL);
708 *DLLMultiGameStarting = 0;
709 break;
710 }
711
712 *DLLMultiGameStarting = 0;
713 if (*DLLDedicated_server) {
714 InitMTSockets();
715 } else {
716 DLLCreateSplashScreen(TXT_PXO_CONNECTING, 1);
717 InitMTSockets();
718 MT_Sock_inited = true;
719 DLLCloseSplashScreen();
720 }
721 if (!All_ok) {
722 *DLLMultiGameStarting = 0;
723 return;
724 }
725 {
726 UnvalidatedDLL = 0;
727 DLLCreateSplashScreen(TXT_PXO_CONNECTING, 1);
728 DLLPollUI();
729 if (MT_Initialized) {
730 DLLPollUI();
731 if (!MTVersionCheck()) {
732 if (Login_aborted) {
733 MT_Initialized = 0;
734 } else {
735 // If the first call fails, try again
736 DLLPollUI();
737 if (!MTVersionCheck()) {
738 DLLPollUI();
739 if (!MTVersionCheck()) {
740 // If this call fails, we have a problem, and when MT_EVT_LOGIN is called we will let the user know.
741 UnvalidatedDLL = 1;
742 }
743 }
744 }
745 }
746 }
747 DLLCloseSplashScreen();
748 if (!MT_Initialized) {
749 DLLDoMessageBox(TXT_PXO_MASTERTRACKER, TXT_PXO_CANTCONNECT, MSGBOX_OK, UICOL_WINDOW_TITLE, UICOL_TEXT_NORMAL);
750 return;
751 }

Callers

nothing calls this directly

Calls 10

DLLDoMessageBoxFunction · 0.85
InitMTSocketsFunction · 0.85
MTVersionCheckFunction · 0.85
LoginMasterTrackerFunction · 0.85
DoMTFrameFunction · 0.85
StartTrackerGameFunction · 0.85
DoMTGameOverFunction · 0.85
AutoLoginAndStartGameFunction · 0.85
MainMultiplayerMenuFunction · 0.70
AutoLoginAndJoinGameFunction · 0.70

Tested by

no test coverage detected