diff --git a/OmsiHook/OmsiChronoChange.cs b/OmsiHook/OmsiChronoChange.cs new file mode 100644 index 0000000..8c2c57c --- /dev/null +++ b/OmsiHook/OmsiChronoChange.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiChronoChange : OmsiObject + { + public OmsiChronoChange() : base() { } + + internal OmsiChronoChange(Memory memory, int address) : base(memory, address) { } + + public int Scenario + { + get => Memory.ReadMemory(Address + 0x4); + set => Memory.WriteMemory(Address + 0x4, value); + } + } +} diff --git a/OmsiHook/OmsiChronoChangeDel.cs b/OmsiHook/OmsiChronoChangeDel.cs new file mode 100644 index 0000000..b8eb03c --- /dev/null +++ b/OmsiHook/OmsiChronoChangeDel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiChronoChangeDel : OmsiChronoChange + { + public OmsiChronoChangeDel() : base() { } + + internal OmsiChronoChangeDel(Memory memory, int address) : base(memory, address) { } + + } +} diff --git a/OmsiHook/OmsiChronoChangeLabels.cs b/OmsiHook/OmsiChronoChangeLabels.cs new file mode 100644 index 0000000..67dc5ac --- /dev/null +++ b/OmsiHook/OmsiChronoChangeLabels.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiChronoChangeLabels : OmsiChronoChange + { + public OmsiChronoChangeLabels() : base() { } + + internal OmsiChronoChangeLabels(Memory memory, int address) : base(memory, address) { } + + public string[] StringVars + { + get => Memory.ReadMemoryStringArray(Address + 0x8); + } + + } +} diff --git a/OmsiHook/OmsiChronoChangeTyp.cs b/OmsiHook/OmsiChronoChangeTyp.cs new file mode 100644 index 0000000..ee24505 --- /dev/null +++ b/OmsiHook/OmsiChronoChangeTyp.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiChronoChangeTyp : OmsiChronoChange + { + public OmsiChronoChangeTyp() : base() { } + + internal OmsiChronoChangeTyp(Memory memory, int address) : base(memory, address) { } + + public string NewTyp + { + get => Memory.ReadMemoryString(Address + 0x8); + set => Memory.WriteMemory(Address + 0x8, value); + } + + } +} diff --git a/OmsiHook/OmsiFileObject.cs b/OmsiHook/OmsiFileObject.cs index 878d3bb..9771be1 100644 --- a/OmsiHook/OmsiFileObject.cs +++ b/OmsiHook/OmsiFileObject.cs @@ -5,5 +5,159 @@ public class OmsiFileObject : OmsiObject public OmsiFileObject() : base() { } internal OmsiFileObject(Memory memory, int address) : base(memory, address) { } + + public OmsiComplMapObj MyComplMapObj + { + get => new(Memory, Memory.ReadMemory(Address + 0x4)); + } + public uint IDCode + { + get => Memory.ReadMemory(Address + 0x8); + set => Memory.WriteMemory(Address + 0x8, value); + } + public bool Refreshed + { + get => Memory.ReadMemory(Address + 0xc); + set => Memory.WriteMemory(Address + 0xc, value); + } + public bool AttachedToObj + { + get => Memory.ReadMemory(Address + 0xd); + set => Memory.WriteMemory(Address + 0xd, value); + } + public bool AttachedToSpl + { + get => Memory.ReadMemory(Address + 0xe); + set => Memory.WriteMemory(Address + 0xe, value); + } + public int IsRepeaterOfTile + { + get => Memory.ReadMemory(Address + 0x10); + set => Memory.WriteMemory(Address + 0x10, value); + } + public int RepeaterOffset + { + get => Memory.ReadMemory(Address + 0x14); + set => Memory.WriteMemory(Address + 0x14, value); + } + public string Obj + { + get => Memory.ReadMemoryString(Address + 0x18); + set => Memory.WriteMemory(Address + 0x18, value); + } + public D3DVector Pos + { + get => Memory.ReadMemory(Address + 0x1c); + set => Memory.WriteMemory(Address + 0x1c, value); + } + public float Hdg + { + get => Memory.ReadMemory(Address + 0x28); + set => Memory.WriteMemory(Address + 0x28, value); + } + public float Pitch + { + get => Memory.ReadMemory(Address + 0x2c); + set => Memory.WriteMemory(Address + 0x2c, value); + } + public float Bank + { + get => Memory.ReadMemory(Address + 0x30); + set => Memory.WriteMemory(Address + 0x30, value); + } + public OmsiFileObject AttObj + { + get => new(Memory, Memory.ReadMemory(Address + 0x34)); + } + public OmsiFileSpline AttSpln + { + get => new(Memory, Memory.ReadMemory(Address + 0x38)); + } + public int AttPnt + { + get => Memory.ReadMemory(Address + 0x3c); + set => Memory.WriteMemory(Address + 0x3c, value); + } + /// + /// Spacing ? + /// + public float Abstand + { + get => Memory.ReadMemory(Address + 0x40); + set => Memory.WriteMemory(Address + 0x40, value); + } + public float Distanz + { + get => Memory.ReadMemory(Address + 0x44); + set => Memory.WriteMemory(Address + 0x44, value); + } + public bool Tangential + { + get => Memory.ReadMemory(Address + 0x48); + set => Memory.WriteMemory(Address + 0x48, value); + } + public byte Priority + { + get => Memory.ReadMemory(Address + 0x49); + set => Memory.WriteMemory(Address + 0x49, value); + } + public string[] StringVars + { + get => Memory.ReadMemoryStringArray(Address + 0x4c); + //set => Memory.WriteMemory(Address + 0x49, value); + } + public OmsiComplMapObjInst[] MyInstance + { + get => Memory.ReadMemoryObjArray(Address + 0x50); + } + public bool AlignTerrain + { + get => Memory.ReadMemory(Address + 0x54); + set => Memory.WriteMemory(Address + 0x54, value); + } + public uint MyVarParent_IDCode + { + get => Memory.ReadMemory(Address + 0x58); + set => Memory.WriteMemory(Address + 0x58, value); + } + public int MyVarParent_Katchel + { + get => Memory.ReadMemory(Address + 0x5c); + set => Memory.WriteMemory(Address + 0x5c, value); + } + public int MyVarParent_Obj + { + get => Memory.ReadMemory(Address + 0x60); + set => Memory.WriteMemory(Address + 0x60, value); + } + public OmsiFileObjectPathInfo[] Paths + { + get => Memory.MarshalStructs( + Memory.ReadMemoryStructArray(Address + 0x64)); + } + public int Chrono_Origin + { + get => Memory.ReadMemory(Address + 0x68); + set => Memory.WriteMemory(Address + 0x68, value); + } + public OmsiChronoChange[] Chrono_Changes + { + get => Memory.ReadMemoryObjArray(Address + 0x6c); + } + public OmsiObjChronoVars Chrono_Active + { + get => new(Memory, Memory.ReadMemory(Address + 0x70)); + } + public bool Chrono_Own + { + get => Memory.ReadMemory(Address + 0x74); + set => Memory.WriteMemory(Address + 0x74, value); + } + public int TempStation + { + get => Memory.ReadMemory(Address + 0x78); + set => Memory.WriteMemory(Address + 0x78, value); + } + } } \ No newline at end of file diff --git a/OmsiHook/OmsiHOF.cs b/OmsiHook/OmsiHOF.cs index dcb12f4..c82dca9 100644 --- a/OmsiHook/OmsiHOF.cs +++ b/OmsiHook/OmsiHOF.cs @@ -16,12 +16,11 @@ public string Name get => Memory.ReadMemoryString(Address + 0x4); set => Memory.WriteMemory(Address + 0x4, value); } - /* public string[] GlobalStrings { - get => Memory.ReadMemoryObjArray(Address + 0x8); + get => Memory.ReadMemoryStringArray(Address + 0x8); //set => Memory.WriteMemory(Address + 0x8, value); - }*/ + } public string ServiceTrip { get => Memory.ReadMemoryString(Address + 0xc); diff --git a/OmsiHook/OmsiObjChronoVars.cs b/OmsiHook/OmsiObjChronoVars.cs new file mode 100644 index 0000000..3dbedc3 --- /dev/null +++ b/OmsiHook/OmsiObjChronoVars.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace OmsiHook +{ + public class OmsiObjChronoVars : OmsiObject + { + public OmsiObjChronoVars() : base() { } + + internal OmsiObjChronoVars(Memory memory, int address) : base(memory, address) { } + + public byte Deleted + { + get => Memory.ReadMemory(Address + 0x4); + set => Memory.WriteMemory(Address + 0x4, value); + } + public string ActivFilename + { + get => Memory.ReadMemoryString(Address + 0x8); + set => Memory.WriteMemory(Address + 0x8, value); + } + public string[] StringsPnt + { + get => Memory.ReadMemoryStringArray(Memory.ReadMemory(Address + 0xc)); + } + + + } +} diff --git a/OmsiHook/OmsiStructs.cs b/OmsiHook/OmsiStructs.cs index fe6a1b7..98d0d7a 100644 --- a/OmsiHook/OmsiStructs.cs +++ b/OmsiHook/OmsiStructs.cs @@ -1125,6 +1125,31 @@ public struct OmsiCollFeedback public float energie; } + public struct OmsiFileObjectPathInfo + { + public OmsiPathRule[] rules; + } + public struct OmsiFileObjectPathInfoInternal + { + [OmsiStructArrayPtr(typeof(OmsiPathRule), typeof(OmsiPathRuleInternal))] public int rules; + } + + public struct OmsiPathRule + { + public short[] trafficDensity_act; + public float[] trafficDensity; + public short priority_act; + public byte priority; + } + + public struct OmsiPathRuleInternal + { + [OmsiObjArrayPtr(typeof(short))] public int trafficDensity_act; + [OmsiObjArrayPtr(typeof(float))] public int trafficDensity; + public short priority_act; + public byte priority; + } + public struct OmsiPointPair { public float x;