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

Function InitGameScript

Descent3/game.cpp:874–895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872
873void RenderBlankScreen(void);
874bool InitGameScript() {
875 // initialize gamemode script here.
876 if (Gamemode_info.scriptname[0]) {
877 //@@ char d3xname[255];
878 char dllname[255];
879
880 snprintf(dllname, sizeof(dllname), "%s", Gamemode_info.scriptname);
881
882 if (!LoadGameDLL(dllname, Gamemode_info.requested_num_teams)) {
883 if (!Dedicated_server) {
884 void (*old_callback)();
885 old_callback = GetUICallback();
886 SetUICallback(RenderBlankScreen);
887 ShowProgressScreen(TXT_LOADMODULEERR);
888 DoMessageBox(TXT_ERROR, TXT_INITMODULEERR, MSGBOX_OK);
889 SetUICallback(old_callback);
890 }
891 return false;
892 }
893 }
894 return true;
895}
896
897void CloseGameScript() {
898 // free any gamemode info.

Callers 1

InitGameFunction · 0.85

Calls 4

LoadGameDLLFunction · 0.85
SetUICallbackFunction · 0.85
ShowProgressScreenFunction · 0.85
DoMessageBoxFunction · 0.85

Tested by

no test coverage detected