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

Function LoadLevel

source/games/exhumed/src/init.cpp:106–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104//---------------------------------------------------------------------------
105
106uint8_t LoadLevel(MapRecord* map)
107{
108 if (map->gameflags & LEVEL_EX_COUNTDOWN)
109 {
110 lCountDown = 81000;
111 nAlarmTicks = 30;
112 nRedTicks = 0;
113 nClockVal = 0;
114 nEnergyTowers = 0;
115 }
116
117 // init stuff
118 {
119 StopAllSounds();
120 Level.clearStats();
121 nFreeze = 0;
122 pSpiritSprite = nullptr;
123 PlayClock = 0;
124 memset(Counters, 0, sizeof(Counters));
125
126 InitQueens();
127 InitRats();
128 InitBullets();
129 InitWeapons();
130 InitSnakes();
131 InitLights();
132 ClearAutomap();
133 InitObjects();
134 InitPushBlocks();
135 InitPlayer();
136 InitItems();
137
138 if (map->gameflags & LEVEL_EX_COUNTDOWN) {
139 InitEnergyTile();
140 }
141 }
142
143 if (map->gameflags & LEVEL_EX_ALTSOUND)
144 {
145 nSwitchSound = 35;
146 nStoneSound = 23;
147 nElevSound = 51;
148 nStopSound = 35;
149 }
150 else
151 {
152 nSwitchSound = 33;
153 nStoneSound = 23;
154 nElevSound = 23;
155 nStopSound = 66;
156 }
157
158 sectortype* initsect;
159 SpawnSpriteDef spawned;
160 DVector3 initpos;
161 int16_t mapang;
162 loadMap(currentLevel->fileName.GetChars(), 0, &initpos, &mapang, &initsect, spawned);
163 auto actors = spawnactors(spawned);

Callers 1

InitLevelFunction · 0.85

Calls 15

InitQueensFunction · 0.85
InitRatsFunction · 0.85
InitBulletsFunction · 0.85
InitWeaponsFunction · 0.85
InitSnakesFunction · 0.85
InitLightsFunction · 0.85
ClearAutomapFunction · 0.85
InitObjectsFunction · 0.85
InitPushBlocksFunction · 0.85
InitPlayerFunction · 0.85
InitItemsFunction · 0.85
InitEnergyTileFunction · 0.85

Tested by

no test coverage detected