MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / LoadEventSets

Function LoadEventSets

TombEngine/Specific/level.cpp:1347–1388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1345}
1346
1347void LoadEventSets()
1348{
1349 int eventSetCount = ReadCount();
1350 if (eventSetCount == 0)
1351 return;
1352
1353 int globalEventSetCount = ReadCount();
1354 TENLog("Global event set count: " + std::to_string(globalEventSetCount), LogLevel::Info);
1355
1356 for (int i = 0; i < globalEventSetCount; i++)
1357 {
1358 auto eventSet = EventSet();
1359
1360 eventSet.Name = ReadString();
1361
1362 int eventCount = ReadCount();
1363 for (int j = 0; j < eventCount; j++)
1364 LoadEvent(eventSet);
1365
1366 g_Level.GlobalEventSets.push_back(eventSet);
1367
1368 if (!eventSet.Events[(int)EventType::Loop].Function.empty())
1369 g_Level.LoopedEventSetIndices.push_back(i);
1370 }
1371
1372 int volumeEventSetCount = ReadCount();
1373 TENLog("Volume event set count: " + std::to_string(volumeEventSetCount), LogLevel::Info);
1374
1375 for (int i = 0; i < volumeEventSetCount; i++)
1376 {
1377 auto eventSet = EventSet();
1378
1379 eventSet.Name = ReadString();
1380 eventSet.Activators = (ActivatorFlags)ReadInt32();
1381
1382 int eventCount = ReadCount();
1383 for (int j = 0; j < eventCount; j++)
1384 LoadEvent(eventSet);
1385
1386 g_Level.VolumeEventSets.push_back(eventSet);
1387 }
1388}
1389
1390FILE* FileOpen(const char* fileName)
1391{

Callers 1

LoadLevelFunction · 0.85

Calls 9

ReadCountFunction · 0.85
TENLogFunction · 0.85
to_stringFunction · 0.85
ReadStringFunction · 0.85
LoadEventFunction · 0.85
ReadInt32Function · 0.85
EventSetClass · 0.50
push_backMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected