MCPcopy Create free account
hub / github.com/BobbyAnguelov/Esoterica / InitializeModule

Method InitializeModule

Code/Engine/_Module/EngineModule.cpp:12–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11//-------------------------------------------------------------------------
12
13#if EE_ENABLE_LPP
14#include "Base/Memory/Memory.h"
15#include "LPP_API_x64_CPP.h"
16#include "Base/Types/Event.h"
17
18namespace EE
19{
20 static TEvent<const wchar_t* const* const, unsigned int> g_event;
21
22 static void FunctionCalledBeforePatching( lpp::LppHotReloadPrepatchHookId, const wchar_t* const recompiledModulePath, const wchar_t* const* const modifiedFiles, unsigned int modifiedFilesCount, const wchar_t* const* const, unsigned int )
23 {
24 Memory::InitializeThreadHeap();
25 g_event.Execute( modifiedFiles, modifiedFilesCount );
26 }
27
28 LPP_HOTRELOAD_PREPATCH_HOOK( FunctionCalledBeforePatching );
29}
30#endif
31
32//-------------------------------------------------------------------------
33
34namespace EE
35{
36 bool EngineModule::InitializeModule( ModuleContext const& context )
37 {
38 #if EE_ENABLE_LPP
39 auto PreLoad = [this] ( const wchar_t* const* const modifiedFiles, unsigned int modifiedFilesCount )
40 {
41 for ( uint32_t i = 0; i < modifiedFilesCount; i++ )
42 {
43 m_modifiedFiles.emplace_back( String( String::CtorConvert(), modifiedFiles[i] ) );
44 }
45 };
46
47 m_lppReloadEventBindingID = g_event.Bind( PreLoad );
48 #endif
49
50 //-------------------------------------------------------------------------
51 // Initialize core systems
52 //-------------------------------------------------------------------------
53
54 #if EE_DEVELOPMENT_TOOLS
55 EntityModel::InitializeLogQueue();
56 #endif
57
58 Render::MeshOptimizer::Initialize();
59 Physics::Core::Initialize();
60 m_physicsMaterialRegistry.Initialize();
61
62 #if EE_ENABLE_NAVPOWER
63 Navmesh::NavPower::Initialize();
64 #endif
65
66 //-------------------------------------------------------------------------
67 // Animation
68 //-------------------------------------------------------------------------
69

Callers 1

InitializeMethod · 0.45

Calls 9

InitializeLogQueueFunction · 0.85
RegisterRendererMethod · 0.80
RegisterSystemMethod · 0.80
InitializeFunction · 0.50
InitializeMethod · 0.45
SetTypeRegistryPtrMethod · 0.45
SetRenderDevicePtrMethod · 0.45

Tested by

no test coverage detected