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

Method LoadConfig

engine/Poseidon/Graphics/Core/Engine.cpp:284–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282 cfg.Save(name);
283}
284void Engine::LoadConfig()
285{
286 RString name = Poseidon::GetUserParams();
287
288 ParamFile cfg;
289 cfg.Parse(name);
290
291 SetBrightness(cfg.ReadValue("brightness", 1.6f)); // 1.6 = original CWA default (matches GraphicsConfig)
292 if (cfg.FindEntry("multitexturing"))
293 {
294 SetMultitexturing(cfg >> "multitexturing");
295 }
296 _aspectSettings.topFOV = cfg.ReadValue("fovTop", 0.75f);
297 _aspectSettings.leftFOV = cfg.ReadValue("fovLeft", 1.0f);
298
299 _aspectSettings.uiTopLeftX = cfg.ReadValue("uiTopLeftX", 0.0f);
300 _aspectSettings.uiTopLeftY = cfg.ReadValue("uiTopLeftY", 0.0f);
301 _aspectSettings.uiBottomRightX = cfg.ReadValue("uiBottomRightX", 1.0f);
302 _aspectSettings.uiBottomRightY = cfg.ReadValue("uiBottomRightY", 1.0f);
303}
304
305void Engine::SetFogColor(ColorVal fogColor)
306{

Callers

nothing calls this directly

Calls 4

GetUserParamsFunction · 0.85
ReadValueMethod · 0.80
ParseMethod · 0.45
FindEntryMethod · 0.45

Tested by

no test coverage detected