MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / LoadOptions

Function LoadOptions

Source/options.cpp:353–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351#endif
352
353void LoadOptions()
354{
355 for (OptionCategoryBase *pCategory : sgOptions.GetCategories()) {
356 for (OptionEntryBase *pEntry : pCategory->GetEntries()) {
357 pEntry->LoadFromIni(pCategory->GetKey());
358 }
359 }
360
361 GetIniValue("Hellfire", "SItem", sgOptions.Hellfire.szItem, sizeof(sgOptions.Hellfire.szItem), "");
362
363 GetIniValue("Network", "Bind Address", sgOptions.Network.szBindAddress, sizeof(sgOptions.Network.szBindAddress), "0.0.0.0");
364 GetIniValue("Network", "Previous Game ID", sgOptions.Network.szPreviousZTGame, sizeof(sgOptions.Network.szPreviousZTGame), "");
365 GetIniValue("Network", "Previous Host", sgOptions.Network.szPreviousHost, sizeof(sgOptions.Network.szPreviousHost), "");
366
367 for (size_t i = 0; i < QUICK_MESSAGE_OPTIONS; i++)
368 GetIniStringVector("NetMsg", QuickMessages[i].key, sgOptions.Chat.szHotKeyMsgs[i]);
369
370 GetIniValue("Controller", "Mapping", sgOptions.Controller.szMapping, sizeof(sgOptions.Controller.szMapping), "");
371 sgOptions.Controller.fDeadzone = GetIniFloat("Controller", "deadzone", 0.07F);
372#ifdef __vita__
373 sgOptions.Controller.bRearTouch = GetIniBool("Controller", "Enable Rear Touchpad", true);
374#endif
375
376 if (demo::IsRunning())
377 demo::OverrideOptions();
378}
379
380void SaveOptions()
381{

Callers 2

RunTimedemoFunction · 0.85
DiabloMainFunction · 0.85

Calls 10

GetIniValueFunction · 0.85
GetIniStringVectorFunction · 0.85
GetIniFloatFunction · 0.85
GetIniBoolFunction · 0.85
GetCategoriesMethod · 0.80
GetEntriesMethod · 0.80
LoadFromIniMethod · 0.80
GetKeyMethod · 0.80
IsRunningFunction · 0.50
OverrideOptionsFunction · 0.50

Tested by 1

RunTimedemoFunction · 0.68