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

Function DeInitializeScripting

TombEngine/Game/control/control.cpp:630–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

628}
629
630void DeInitializeScripting(int levelIndex, GameStatus reason)
631{
632 // Reload gameflow script to clear level script variables.
633 if (reason != GameStatus::ExitGame)
634 g_GameFlow->LoadFlowScript();
635
636 g_GameScript->FreeLevelScripts();
637 g_GameScriptEntities->FreeEntities();
638
639 // If level index is 0, it means we are in a title level and game variables should be cleared.
640 if (levelIndex == 0)
641 g_GameScript->ResetScripts(true);
642}
643
644void InitializeOrLoadGame(bool loadGame)
645{

Callers 1

EndGameLoopFunction · 0.85

Calls 4

LoadFlowScriptMethod · 0.80
FreeLevelScriptsMethod · 0.80
FreeEntitiesMethod · 0.80
ResetScriptsMethod · 0.80

Tested by

no test coverage detected