MCPcopy Create free account
hub / github.com/diasurgical/devilution / CreateLevel

Function CreateLevel

Source/diablo.cpp:1365–1403  ·  view source on GitHub ↗

* @param lvldir method of entry */

Source from the content-addressed store, hash-verified

1363 * @param lvldir method of entry
1364 */
1365void CreateLevel(int lvldir)
1366{
1367 switch (leveltype) {
1368 case DTYPE_TOWN:
1369 CreateTown(lvldir);
1370 InitTownTriggers();
1371 LoadRndLvlPal(0);
1372 break;
1373 case DTYPE_CATHEDRAL:
1374 CreateL5Dungeon(glSeedTbl[currlevel], lvldir);
1375 InitL1Triggers();
1376 Freeupstairs();
1377 LoadRndLvlPal(1);
1378 break;
1379#ifndef SPAWN
1380 case DTYPE_CATACOMBS:
1381 CreateL2Dungeon(glSeedTbl[currlevel], lvldir);
1382 InitL2Triggers();
1383 Freeupstairs();
1384 LoadRndLvlPal(2);
1385 break;
1386 case DTYPE_CAVES:
1387 CreateL3Dungeon(glSeedTbl[currlevel], lvldir);
1388 InitL3Triggers();
1389 Freeupstairs();
1390 LoadRndLvlPal(3);
1391 break;
1392 case DTYPE_HELL:
1393 CreateL4Dungeon(glSeedTbl[currlevel], lvldir);
1394 InitL4Triggers();
1395 Freeupstairs();
1396 LoadRndLvlPal(4);
1397 break;
1398#endif
1399 default:
1400 app_fatal("CreateLevel");
1401 break;
1402 }
1403}
1404
1405void LoadGameLevel(BOOL firstflag, int lvldir)
1406{

Callers 1

LoadGameLevelFunction · 0.85

Calls 12

CreateTownFunction · 0.85
LoadRndLvlPalFunction · 0.85
CreateL5DungeonFunction · 0.85
InitL1TriggersFunction · 0.85
FreeupstairsFunction · 0.85
CreateL2DungeonFunction · 0.85
InitL2TriggersFunction · 0.85
CreateL3DungeonFunction · 0.85
InitL3TriggersFunction · 0.85
CreateL4DungeonFunction · 0.85
InitL4TriggersFunction · 0.85
app_fatalFunction · 0.85

Tested by

no test coverage detected