diff --git a/OmsiHook/OmsiActuWeather.cs b/OmsiHook/OmsiActuWeather.cs new file mode 100644 index 0000000..d857681 --- /dev/null +++ b/OmsiHook/OmsiActuWeather.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiActuWeather : OmsiObject + { + internal OmsiActuWeather(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } + public OmsiActuWeather() : base() { } + /* + public OmsiWebBrowser WebBrowser1 + { + get => new(Memory, Memory.ReadMemory(Address + 0x4)); + }*/ + public bool Active + { + get => Memory.ReadMemory(Address + 0x8); + set => Memory.WriteMemory(Address + 0x8, value); + } + public string ICAO + { + get => Memory.ReadMemoryString(Address + 0xc); + set => Memory.WriteMemory(Address + 0xc, value); + } + /// + /// Delphi DateTime - integer part = days since 30/12/1899, fraction part = time of day + /// + public double LastDownloaded + { + get => Memory.ReadMemory(Address + 0x10); + set => Memory.WriteMemory(Address + 0x10, value); + } + public bool Invalid_ICAO + { + get => Memory.ReadMemory(Address + 0x18); + set => Memory.WriteMemory(Address + 0x18, value); + } + public uint Counter + { + get => Memory.ReadMemory(Address + 0x1c); + set => Memory.WriteMemory(Address + 0x1c, value); + } + public byte Prozess + { + get => Memory.ReadMemory(Address + 0x20); + set => Memory.WriteMemory(Address + 0x20, value); + } + } +} diff --git a/OmsiHook/OmsiHook.cs b/OmsiHook/OmsiHook.cs index b1f89bc..8f373b6 100644 --- a/OmsiHook/OmsiHook.cs +++ b/OmsiHook/OmsiHook.cs @@ -26,6 +26,10 @@ public class OmsiHook public OmsiTime Time => new(omsiMemory, 0); public OmsiDriver[] Drivers => omsiMemory.MarshalStructs(omsiMemory.ReadMemoryStructArray(0x008614F8)); public int SelectedDriver => omsiMemory.ReadMemory(0x008614FC); + /// + /// Current real weather config + /// + public OmsiActuWeather ActuWeather => new(omsiMemory, omsiMemory.ReadMemory(0x00861278)); public OmsiHumanBeingInst[] Humans => omsiMemory.ReadMemoryObjArray(0x0086172c); ///