MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / level_load

Function level_load

TheForceEngine/TFE_Jedi/Level/level.cpp:54–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 JBool level_loadGoals(const char* levelName);
53
54 JBool level_load(const char* levelName, u8 difficulty)
55 {
56 if (!levelName) { return JFALSE; }
57
58 // Clear just in case.
59 for (s32 i = 0; i < NUM_COMPLETE; i++)
60 {
61 s_levelState.completeNum[COMPL_TRIG][i] = -1;
62 s_levelState.completeNum[COMPL_ITEM][i] = -1;
63
64 s_levelState.complete[COMPL_TRIG][i] = JFALSE;
65 s_levelState.complete[COMPL_ITEM][i] = JFALSE;
66 }
67
68 // Settings helper
69 TFE_Settings::setLevelName(levelName);
70
71 // TFE - Level Script, loading before INF
72 loadLevelScript();
73
74 // Load level data.
75 if (!level_loadGeometry(levelName)) { return JFALSE; }
76 level_loadObjects(levelName, difficulty);
77 inf_load(levelName);
78 level_loadGoals(levelName);
79
80 // TFE - Level Script Level Start
81 startLevelScript(levelName);
82
83 return JTRUE;
84 }
85
86 void level_loadPalette()
87 {

Callers 1

mission_startTaskFuncFunction · 0.85

Calls 7

setLevelNameFunction · 0.85
loadLevelScriptFunction · 0.85
level_loadGeometryFunction · 0.85
level_loadObjectsFunction · 0.85
inf_loadFunction · 0.85
level_loadGoalsFunction · 0.85
startLevelScriptFunction · 0.85

Tested by

no test coverage detected