MCPcopy Create free account
hub / github.com/ZDoom/Raze / InitLevel

Function InitLevel

source/games/exhumed/src/init.cpp:187–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185//---------------------------------------------------------------------------
186
187void InitLevel(MapRecord* map)
188{
189 StopCD();
190 currentLevel = map;
191 if (!LoadLevel(map)) {
192 I_Error("Cannot load %s...\n", map->fileName.GetChars());
193 }
194 EndLevel = 0;
195 ResetView();
196 ResetEngine();
197 totalmoves = 0;
198 GrabPalette();
199
200 if (!mus_redbook && map->music.IsNotEmpty()) Mus_Play(map->music.GetChars(), true); // Allow non-CD music if defined for the current level
201 playCDtrack(map->cdSongId, true);
202 setLevelStarted(currentLevel);
203}
204
205//---------------------------------------------------------------------------
206//

Callers 2

NextLevelMethod · 0.70
NewGameMethod · 0.70

Calls 11

StopCDFunction · 0.85
LoadLevelFunction · 0.85
I_ErrorFunction · 0.85
ResetViewFunction · 0.85
ResetEngineFunction · 0.85
GrabPaletteFunction · 0.85
Mus_PlayFunction · 0.85
playCDtrackFunction · 0.85
setLevelStartedFunction · 0.85
IsNotEmptyMethod · 0.80
GetCharsMethod · 0.45

Tested by

no test coverage detected