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

Function LoadGameLevel

Source/diablo.cpp:1405–1630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403}
1404
1405void LoadGameLevel(BOOL firstflag, int lvldir)
1406{
1407 int i, j;
1408 BOOL visited;
1409
1410 if (setseed)
1411 glSeedTbl[currlevel] = setseed;
1412
1413 music_stop();
1414 SetCursor_(CURSOR_HAND);
1415 SetRndSeed(glSeedTbl[currlevel]);
1416 IncProgress();
1417 MakeLightTable();
1418 LoadLvlGFX();
1419 IncProgress();
1420
1421 if (firstflag) {
1422 InitInv();
1423 InitItemGFX();
1424 InitQuestText();
1425
1426 for (i = 0; i < gbMaxPlayers; i++)
1427 InitPlrGFXMem(i);
1428
1429 InitStores();
1430 InitAutomapOnce();
1431 InitHelp();
1432 }
1433
1434 SetRndSeed(glSeedTbl[currlevel]);
1435
1436 if (leveltype == DTYPE_TOWN)
1437 SetupTownStores();
1438
1439 IncProgress();
1440 InitAutomap();
1441
1442 if (leveltype != DTYPE_TOWN && lvldir != 4) {
1443 InitLighting();
1444 InitVision();
1445 }
1446
1447 InitLevelMonsters();
1448 IncProgress();
1449
1450 if (!setlevel) {
1451 CreateLevel(lvldir);
1452 IncProgress();
1453 FillSolidBlockTbls();
1454 SetRndSeed(glSeedTbl[currlevel]);
1455
1456 if (leveltype != DTYPE_TOWN) {
1457 GetLevelMTypes();
1458 InitThemes();
1459 LoadAllGFX();
1460 } else {
1461 IncProgress();
1462 IncProgress();

Callers 2

ShowProgressFunction · 0.85
LoadGameFunction · 0.85

Calls 15

music_stopFunction · 0.85
SetCursor_Function · 0.85
SetRndSeedFunction · 0.85
IncProgressFunction · 0.85
MakeLightTableFunction · 0.85
LoadLvlGFXFunction · 0.85
InitInvFunction · 0.85
InitItemGFXFunction · 0.85
InitQuestTextFunction · 0.85
InitPlrGFXMemFunction · 0.85
InitStoresFunction · 0.85
InitAutomapOnceFunction · 0.85

Tested by

no test coverage detected