-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installer / VR / LOD Format / Profiles / MinLOD only FPS / DefaultLOD…
… / conf. Offsets / GUI Changes / Installer FSUIPC Auto-Start
- Loading branch information
1 parent
5e0deec
commit 3a7957a
Showing
35 changed files
with
1,970 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
|
||
# CUSTOM | ||
Releases/ | ||
AppPackage.zip | ||
Build.ps1 | ||
CopyToMSFS.ps1 | ||
desktop.ini | ||
build.lck | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Xml; | ||
|
||
namespace DynamicLOD | ||
{ | ||
public class ConfigurationFile | ||
{ | ||
private Dictionary<string, string> appSettings = new(); | ||
private XmlDocument xmlDoc = new(); | ||
|
||
public string this[string key] | ||
{ | ||
get => GetSetting(key); | ||
set => SetSetting(key, value); | ||
} | ||
|
||
public void LoadConfiguration() | ||
{ | ||
xmlDoc = new(); | ||
xmlDoc.LoadXml(File.ReadAllText(App.ConfigFile)); | ||
|
||
XmlNode xmlSettings = xmlDoc.ChildNodes[1]; | ||
appSettings.Clear(); | ||
foreach(XmlNode child in xmlSettings.ChildNodes) | ||
appSettings.Add(child.Attributes["key"].Value, child.Attributes["value"].Value); | ||
} | ||
|
||
public void SaveConfiguration() | ||
{ | ||
foreach (XmlNode child in xmlDoc.ChildNodes[1]) | ||
child.Attributes["value"].Value = appSettings[child.Attributes["key"].Value]; | ||
|
||
xmlDoc.Save(App.ConfigFile); | ||
} | ||
|
||
public string GetSetting(string key, string defaultValue = "") | ||
{ | ||
if (appSettings.ContainsKey(key)) | ||
return appSettings[key]; | ||
else | ||
{ | ||
XmlNode newNode = xmlDoc.CreateElement("add"); | ||
|
||
XmlAttribute attribute = xmlDoc.CreateAttribute("key"); | ||
attribute.Value = key; | ||
newNode.Attributes.Append(attribute); | ||
|
||
attribute = xmlDoc.CreateAttribute("value"); | ||
attribute.Value = defaultValue; | ||
newNode.Attributes.Append(attribute); | ||
|
||
xmlDoc.ChildNodes[1].AppendChild(newNode); | ||
appSettings.Add(key, defaultValue); | ||
SaveConfiguration(); | ||
|
||
return defaultValue; | ||
} | ||
} | ||
|
||
public void SetSetting(string key, string value) | ||
{ | ||
if (appSettings.ContainsKey(key)) | ||
{ | ||
appSettings[key] = value; | ||
SaveConfiguration(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<appSettings> | ||
<add key="mfLvarPerFrame" value="15" /> | ||
<add key="ConfigVersion" value="1" /> | ||
<add key="logFilePath" value="DynamicLOD.log" /> | ||
<add key="logLevel" value="Debug" /> | ||
<add key="waitForConnect" value="true" /> | ||
<add key="openWindow" value="true" /> | ||
<add key="simBinary" value="FlightSimulator" /> | ||
<add key="simModule" value="WwiseLibPCx64P.dll" /> | ||
<add key="offsetModuleBase" value="0x004B2368"/> | ||
<add key="offsetPointerMain" value="0x3D0"/> | ||
<add key="offsetPointerTlod" value="0xC"/> | ||
<add key="offsetPointerTlodVr" value="0x114"/> | ||
<add key="offsetPointerOlod" value="0xC"/> | ||
<add key="simMinLod" value="10"/> | ||
<add key="selectedProfile" value="0"/> | ||
<add key="tlodPairs0" value="0:100|1500:150|5000:200" /> | ||
<add key="olodPairs0" value="0:100|2500:150|7500:200" /> | ||
<add key="isVr0" value="false"/> | ||
<add key="tlodPairs1" value="0:100|500:125|2000:150|7500:175|15000:200|20000:225" /> | ||
<add key="olodPairs1" value="0:100|500:125|2500:150|5000:175|9500:200" /> | ||
<add key="isVr1" value="false"/> | ||
<add key="tlodPairs2" value="0:100|1500:150|5000:200" /> | ||
<add key="olodPairs2" value="0:100|2500:150|7500:200" /> | ||
<add key="isVr2" value="true"/> | ||
<add key="defaultTlod" value="200" /> | ||
<add key="defaultOlod" value="200" /> | ||
<add key="useTargetFps" value="false" /> | ||
<add key="targetFpsIndex" value="0"/> | ||
<add key="targetFps" value="40" /> | ||
<add key="constraintTicks" value="60" /> | ||
<add key="decreaseTlod" value="50" /> | ||
<add key="decreaseOlod" value="50" /> | ||
<add key="minLod" value="100" /> | ||
</appSettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.