MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / pf_init_step

Function pf_init_step

engine/PoseidonFormats/PoseidonFormats.cpp:100–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98// Step-by-step init for debugging (call with step 1,2,3,4 in order)
99static int g_initStep = 0;
100PF_API int pf_init_step(int step) {
101 if (step == 1) { Poseidon::Foundation::CurrentAppFrameFunctions = &g_appFrame; g_initStep = 1; return 1; }
102 if (step == 2) { SetMemorySystemReady(true); g_initStep = 2; return 1; }
103 if (step == 3) { InitLibraryElement(); g_initStep = 3; return 1; }
104 if (step == 4)
105 {
106 Poseidon::GEngine = Poseidon::CreateEngineDummy();
107 g_initStep = 4;
108 g_initialized = true;
109 ClearError();
110 return 1;
111 }
112 return 0;
113}
114
115PF_API int pf_init(void) {
116 std::lock_guard<std::mutex> lock(g_initMutex);

Callers

nothing calls this directly

Calls 4

InitLibraryElementFunction · 0.85
CreateEngineDummyFunction · 0.85
ClearErrorFunction · 0.85
SetMemorySystemReadyFunction · 0.50

Tested by

no test coverage detected