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

Function SimpleStartLevel

Descent3/gamesequence.cpp:1338–1351  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// quickly sets up a mission of 1 level, and doesn't do any fancy intro stuff

Source from the content-addressed store, hash-verified

1336// quickly sets up a mission of 1 level, and doesn't do any
1337// fancy intro stuff
1338bool SimpleStartLevel(char *level_name) {
1339 // this initializes a mini one level mission with no frills.
1340
1341 Current_mission.cur_level = 1;
1342 Current_mission.num_levels = 1;
1343 Current_mission.levels = (tLevelNode *)mem_malloc(sizeof(tLevelNode));
1344 memset(Current_mission.levels, 0, sizeof(tLevelNode));
1345
1346 Current_level = NULL;
1347 Current_mission.levels[0].filename = mem_strdup(level_name);
1348 InitMissionScript();
1349
1350 return true;
1351}
1352
1353///////////////////////////////////////////////////////////////////////////////
1354// We start a game by using the current mission in memory.

Callers 2

ProcessCommandLineFunction · 0.85
MenuLoadLevelFunction · 0.85

Calls 1

InitMissionScriptFunction · 0.85

Tested by

no test coverage detected