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

Function InitMissionScript

Descent3/Mission.cpp:1661–1684  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// Script Management for Missions and Levels ////////////////////////////////////////////////////////////////////////// Initializes a mission's default script

Source from the content-addressed store, hash-verified

1659///////////////////////////////////////////////////////////////////////////////
1660// Initializes a mission's default script
1661bool InitMissionScript() {
1662 // need to do this so when UI runs, it has a background.
1663 // SetUICallback(DEFAULT_UICALLBACK);
1664 // if there is no default script, we will load a null script, which means that whatever object
1665 // uses scripts, will not do anything.
1666 //@@ fp = cfopen(DEFAULT_SCROBJ_NAME, "rb");
1667 //@@ if (!fp) {
1668 //@@ DoMessageBox("Error", "Unable to find mission script.", MSGBOX_OK, UICOL_WINDOW_TITLE,
1669 // UICOL_TEXT_NORMAL);
1670 //@@ mprintf(0, "Unable to open default script. Loading null script...\n");
1671 //@@ return false;
1672 //@@ }
1673 //@@ else {
1674 //@@ Current_mission.d3xmod = D3XLoadProgram(fp);
1675 //@@ if (!Current_mission.d3xmod) {
1676 //@@ DoMessageBox("Error", "Unable to find mission script.", MSGBOX_OK, UICOL_WINDOW_TITLE,
1677 // UICOL_TEXT_NORMAL);
1678 //@@ mprintf(0, "Unable to open default script. Loading null script...\n");
1679 //@@ return false;
1680 //@@ }
1681 //@@ cfclose(fp);
1682 //@@ }
1683 return true;
1684}
1685extern bool IsRestoredGame;
1686void InitLevelScript() {
1687 if (Current_level->filename) {

Callers 4

SimpleStartLevelFunction · 0.85
DemoMissionFunction · 0.85
LoadMissionFunction · 0.85
QuickStartMissionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected