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

Function LoadEvent

TombEngine/Specific/level.cpp:1328–1345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1326}
1327
1328void LoadEvent(EventSet& eventSet)
1329{
1330 int eventType = ReadInt32();
1331
1332 if (eventType >= (int)EventType::Count)
1333 {
1334 TENLog("Unknown event type detected for event set " + eventSet.Name + ". Fall back to default.", LogLevel::Warning);
1335 eventType = (int)EventType::Enter;
1336 }
1337
1338 auto& evt = eventSet.Events[eventType];
1339
1340 evt.Mode = (EventMode)ReadInt32();
1341 evt.Function = ReadString();
1342 evt.Data = ReadString();
1343 evt.CallCounter = ReadInt32();
1344 evt.Enabled = ReadBool();
1345}
1346
1347void LoadEventSets()
1348{

Callers 1

LoadEventSetsFunction · 0.85

Calls 4

ReadInt32Function · 0.85
TENLogFunction · 0.85
ReadStringFunction · 0.85
ReadBoolFunction · 0.85

Tested by

no test coverage detected