From 3bd67b090efb4dcf0ab3db3c22c903c2e0725052 Mon Sep 17 00:00:00 2001 From: Adam Mathieson Date: Mon, 18 Apr 2022 01:22:47 +0200 Subject: [PATCH 1/5] + THumanBeing --- OmsiHook/OmsiHumanBeing.cs | 143 +++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 OmsiHook/OmsiHumanBeing.cs diff --git a/OmsiHook/OmsiHumanBeing.cs b/OmsiHook/OmsiHumanBeing.cs new file mode 100644 index 0000000..4b927a1 --- /dev/null +++ b/OmsiHook/OmsiHumanBeing.cs @@ -0,0 +1,143 @@ +using System; + +namespace OmsiHook +{ + public class OmsiHumanBeing : OmsiComplMapObj + { + internal OmsiHumanBeing(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } + internal OmsiHumanBeing() : base() { } + + public string Voice + { + get => Memory.ReadMemoryString(Address + 0x264); + set => Memory.WriteMemory(Address + 0x264, value); + } + public float Age + { + get => Memory.ReadMemory(Address + 0x268); + set => Memory.WriteMemory(Address + 0x268, value); + } + public float AssHeight + { + get => Memory.ReadMemory(Address + 0x26c); + set => Memory.WriteMemory(Address + 0x26c, value); + } + public float Height + { + get => Memory.ReadMemory(Address + 0x270); + set => Memory.WriteMemory(Address + 0x270, value); + } + public float FeetDist + { + get => Memory.ReadMemory(Address + 0x274); + set => Memory.WriteMemory(Address + 0x274, value); + } + public D3DVector Shoulder + { + get => Memory.ReadMemory(Address + 0x278); + set => Memory.WriteMemory(Address + 0x278, value); + } + public D3DVector Elbow + { + get => Memory.ReadMemory(Address + 0x284); + set => Memory.WriteMemory(Address + 0x284, value); + } + public D3DVector Carpus + { + get => Memory.ReadMemory(Address + 0x290); + set => Memory.WriteMemory(Address + 0x290, value); + } + public D3DVector Finger + { + get => Memory.ReadMemory(Address + 0x29c); + set => Memory.WriteMemory(Address + 0x29c, value); + } + public D3DVector Neck + { + get => Memory.ReadMemory(Address + 0x2a8); + set => Memory.WriteMemory(Address + 0x2a8, value); + } + public D3DVector Waist + { + get => Memory.ReadMemory(Address + 0x2b4); + set => Memory.WriteMemory(Address + 0x2b4, value); + } + public D3DVector Hip + { + get => Memory.ReadMemory(Address + 0x2c0); + set => Memory.WriteMemory(Address + 0x2c0, value); + } + public D3DVector Knee + { + get => Memory.ReadMemory(Address + 0x2cc); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + /// + /// Incriment + /// + public float Anim_Walk_Schritteweite + { + get => Memory.ReadMemory(Address + 0x2d8); + set => Memory.WriteMemory(Address + 0x2d8, value); + } + /// + /// Arm Swing? + /// + public float Anim_Walk_ArmSchwing + { + get => Memory.ReadMemory(Address + 0x2dc); + set => Memory.WriteMemory(Address + 0x2dc, value); + } + /// + /// Hips? + /// + public float Anim_Walk_Huefte + { + get => Memory.ReadMemory(Address + 0x2e0); + set => Memory.WriteMemory(Address + 0x2e0, value); + } + /// + /// Waist? + /// + public float Anim_Walk_Taille + { + get => Memory.ReadMemory(Address + 0x2e4); + set => Memory.WriteMemory(Address + 0x2e4, value); + } + public float Anim_Walk_Upper_Arm_Beta + { + get => Memory.ReadMemory(Address + 0x2e8); + set => Memory.WriteMemory(Address + 0x2e8, value); + } + public D3DVector UA_L_Vec + { + get => Memory.ReadMemory(Address + 0x2ec); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + public D3DVector UA_R_Vec + { + get => Memory.ReadMemory(Address + 0x2f8); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + public D3DVector OA_L_Vec + { + get => Memory.ReadMemory(Address + 0x304); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + public D3DVector OA_R_Vec + { + get => Memory.ReadMemory(Address + 0x310); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + public D3DVector OS_L_Vec + { + get => Memory.ReadMemory(Address + 0x31c); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + public D3DVector OS_R_Vec + { + get => Memory.ReadMemory(Address + 0x328); + set => Memory.WriteMemory(Address + 0x2cc, value); + } + } +} From 62ae322fb7233e062f3a7eef7f6b52fc67fa7549 Mon Sep 17 00:00:00 2001 From: Adam Mathieson Date: Mon, 18 Apr 2022 13:27:13 +0200 Subject: [PATCH 2/5] + OmsiSoundPack --- OmsiHook/OmsiSound.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 OmsiHook/OmsiSound.cs diff --git a/OmsiHook/OmsiSound.cs b/OmsiHook/OmsiSound.cs new file mode 100644 index 0000000..0ce73ae --- /dev/null +++ b/OmsiHook/OmsiSound.cs @@ -0,0 +1,20 @@ +namespace OmsiHook +{ + public class OmsiSound : OmsiObject + { + internal OmsiSound(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } + public OmsiSound() : base() { } + + /*public DirectSound8 Device + { + get => Memory.ReadMemory(Address + 0x4); + set => Memory.WriteMemory(Address + 0x4, value); + }*/ + public string FileName + { + get => Memory.ReadMemoryString(Memory.ReadMemory(Address + 0x8)); + set => Memory.WriteMemory(Address + 0x8, value); + } + + } +} \ No newline at end of file From ed24381b5d292d93437cf975fee81b2a764e0587 Mon Sep 17 00:00:00 2001 From: Adam Mathieson Date: Mon, 18 Apr 2022 13:27:44 +0200 Subject: [PATCH 3/5] + OmsiSoundPack --- OmsiHook/OmsiSoundPack.cs | 80 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 OmsiHook/OmsiSoundPack.cs diff --git a/OmsiHook/OmsiSoundPack.cs b/OmsiHook/OmsiSoundPack.cs new file mode 100644 index 0000000..92c2e08 --- /dev/null +++ b/OmsiHook/OmsiSoundPack.cs @@ -0,0 +1,80 @@ +namespace OmsiHook +{ + public class OmsiSoundPack : OmsiObject + { + internal OmsiSoundPack(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } + internal OmsiSoundPack() : base() { } + + /*public DirectSound8 Device + { + get => Memory.ReadMemory(Address + 0x4); + set => Memory.WriteMemory(Address + 0x4, value); + }*/ + public string FileName + { + get => Memory.ReadMemoryString(Memory.ReadMemory(Address + 0x8)); + set => Memory.WriteMemory(Address + 0x8, value); + } + public bool AI + { + get => Memory.ReadMemory(Address + 0xc); + set => Memory.WriteMemory(Address + 0xc, value); + } + public string Path + { + get => Memory.ReadMemoryString(Memory.ReadMemory(Address + 0x10)); + set => Memory.WriteMemory(Address + 0x10, value); + } + public int SoundCount + { + get => Memory.ReadMemory(Address + 0x14); + set => Memory.WriteMemory(Address + 0x14, value); + } + public OmsiSound[] Sounds + { + get => Memory.ReadMemoryObjArray(Address + 0x18); + } + public float RefRange + { + get => Memory.ReadMemory(Address + 0x1c); + set => Memory.WriteMemory(Address + 0x1c, value); + } + /* TODO: + public OmsiSingleVarsPnter[] Vars + { + get => Memory.ReadMemory(Address + 0x20); + set => Memory.WriteMemory(Address + 0x20, value); + }*/ + public D3DMatrix KoordSystem + { + get => Memory.ReadMemory(Memory.ReadMemory(Address + 0x24)); + set => Memory.WriteMemory(Memory.ReadMemory(Address + 0x24), value); + } + public bool Loaded + { + get => Memory.ReadMemory(Address + 0x28); + set => Memory.WriteMemory(Address + 0x28, value); + } + public float Dist + { + get => Memory.ReadMemory(Address + 0x2c); + set => Memory.WriteMemory(Address + 0x2c, value); + } + public string SoundIdent + { + get => Memory.ReadMemoryString(Memory.ReadMemory(Address + 0x30), true); + set => Memory.WriteMemory(Address + 0x30, value); + } + public bool TooFar + { + get => Memory.ReadMemory(Address + 0x34); + set => Memory.WriteMemory(Address + 0x34, value); + } + public bool Stopped_TooFar + { + get => Memory.ReadMemory(Address + 0x35); + set => Memory.WriteMemory(Address + 0x35, value); + } + + } +} \ No newline at end of file From e9cb622c4322af4908bef8363d72637bdc671783 Mon Sep 17 00:00:00 2001 From: Adam Mathieson Date: Mon, 18 Apr 2022 13:46:14 +0200 Subject: [PATCH 4/5] + OmsiComplMapObjInst --- OmsiHook/OmsiCamera.cs | 2 +- OmsiHook/OmsiComplMapObjInst.cs | 121 ++++++++++++++++++++++++++++++++ OmsiHook/OmsiSoundPack.cs | 5 +- OmsiHook/OmsiStructs.cs | 6 ++ 4 files changed, 130 insertions(+), 4 deletions(-) diff --git a/OmsiHook/OmsiCamera.cs b/OmsiHook/OmsiCamera.cs index 2a4372a..ca1d54e 100644 --- a/OmsiHook/OmsiCamera.cs +++ b/OmsiHook/OmsiCamera.cs @@ -3,7 +3,7 @@ public class OmsiCamera : OmsiObject { internal OmsiCamera(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } - internal OmsiCamera() : base() { } + public OmsiCamera() : base() { } public string Name { diff --git a/OmsiHook/OmsiComplMapObjInst.cs b/OmsiHook/OmsiComplMapObjInst.cs index 678d4b4..337507f 100644 --- a/OmsiHook/OmsiComplMapObjInst.cs +++ b/OmsiHook/OmsiComplMapObjInst.cs @@ -4,5 +4,126 @@ public class OmsiComplMapObjInst : OmsiPhysObjInst { internal OmsiComplMapObjInst(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } public OmsiComplMapObjInst() : base() { } + + public uint IDCode + { + get => Memory.ReadMemory(Address + 0x1e4); + set => Memory.WriteMemory(Address + 0x1e4, value); + } + public OmsiObject MyFileObject + { + get => new(Memory, Address + 0x1e8); + } + public float EinsVar + { + get => Memory.ReadMemory(Address + 0x1ec); + set => Memory.WriteMemory(Address + 0x1ec, value); + } + public float Debug // TODO: Check Data Type + { + get => Memory.ReadMemory(Address + 0x1f0); + set => Memory.WriteMemory(Address + 0x1f0, value); + } + public float Unknown_A // TODO: Check Data Name + { + get => Memory.ReadMemory(Address + 0x1f4); + set => Memory.WriteMemory(Address + 0x1f4, value); + } + public float Unknown_B // TODO: Check Data Name + { + get => Memory.ReadMemory(Address + 0x1f8); + set => Memory.WriteMemory(Address + 0x1f8, value); + } + public float Unknown_C // TODO: Check Data Name + { + get => Memory.ReadMemory(Address + 0x1fc); + set => Memory.WriteMemory(Address + 0x1fc, value); + } + public float Unknown_D // TODO: Check Data Name + { + get => Memory.ReadMemory(Address + 0x200); + set => Memory.WriteMemory(Address + 0x200, value); + } + public float Unknown_E // TODO: Check Data Name + { + get => Memory.ReadMemory(Address + 0x204); + set => Memory.WriteMemory(Address + 0x204, value); + } + public string SoundItent + { + get => Memory.ReadMemoryString(Memory.ReadMemory(Address + 0x208), true); + } + public float FarbSchema + { + get => Memory.ReadMemory(Address + 0x20c); + set => Memory.WriteMemory(Address + 0x20c, value); + } + public OmsiComplMapObj ComplMapObj + { + get => new(Memory, Address + 0x210); + } + public OmsiComplMapObjInst ComplMapObjInst + { + get => new(Memory, Address + 0x214); + } + public bool UseSound + { + get => Memory.ReadMemory(Address + 0x218); + set => Memory.WriteMemory(Address + 0x218, value); + } + public OmsiSoundPack SoundPack + { + get => new(Memory, Address + 0x21c); + } + public OmsiCamera[] ReflCameras + { + get => Memory.ReadMemoryObjArray(Address + 0x220); + } + public byte Selected + { + get => Memory.ReadMemory(Address + 0x224); + set => Memory.WriteMemory(Address + 0x224, value); + } + public D3DColorValue AmbLight + { + get => Memory.ReadMemory(Address + 0x225); + set => Memory.WriteMemory(Address + 0x225, value); + } + /* TODO: + public floatptr[] PublicVars_Int + { + get => Memory.ReadMemoryStructArray(Address + 0x238); + } + public floatptr[] PublicVars + { + get => Memory.ReadMemoryStructArray(Address + 0x23c); + }*/ + public OmsiComplMapObjInst ScriptShareParent + { + get => new(Memory, Address + 0x240); + } + public float[] UserVars + { + get => Memory.ReadMemoryStructArray(Address + 0x244); + } + public int MyPathGroup + { + get => Memory.ReadMemory(Address + 0x248); + set => Memory.WriteMemory(Address + 0x248, value); + } + public float OutsideVol + { + get => Memory.ReadMemory(Address + 0x24c); + set => Memory.WriteMemory(Address + 0x24c, value); + } + public bool CollFeedback_Activ + { + get => Memory.ReadMemory(Address + 0x250); + set => Memory.WriteMemory(Address + 0x250, value); + } + public OmsiCollFeedback[] CollFeedbacks + { + get => Memory.ReadMemoryStructArray(Address + 0x254); + } } } \ No newline at end of file diff --git a/OmsiHook/OmsiSoundPack.cs b/OmsiHook/OmsiSoundPack.cs index 92c2e08..4116164 100644 --- a/OmsiHook/OmsiSoundPack.cs +++ b/OmsiHook/OmsiSoundPack.cs @@ -40,10 +40,9 @@ public float RefRange set => Memory.WriteMemory(Address + 0x1c, value); } /* TODO: - public OmsiSingleVarsPnter[] Vars + public floatptr[] Vars { - get => Memory.ReadMemory(Address + 0x20); - set => Memory.WriteMemory(Address + 0x20, value); + get => Memory.ReadMemoryStructArray(Address + 0x20); }*/ public D3DMatrix KoordSystem { diff --git a/OmsiHook/OmsiStructs.cs b/OmsiHook/OmsiStructs.cs index e7b4c32..a89f08a 100644 --- a/OmsiHook/OmsiStructs.cs +++ b/OmsiHook/OmsiStructs.cs @@ -885,4 +885,10 @@ public struct OmsiTreeTextureSet { public int main, winterSnow; } + + public struct OmsiCollFeedback + { + public D3DVector position; + public float energie; + } } From d20826868c9419bbfcdf3e51fecb78786128df41 Mon Sep 17 00:00:00 2001 From: Adam Mathieson Date: Mon, 18 Apr 2022 13:47:41 +0200 Subject: [PATCH 5/5] + Remove overlapping keywords --- OmsiHook/OmsiComplMapObjInst.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OmsiHook/OmsiComplMapObjInst.cs b/OmsiHook/OmsiComplMapObjInst.cs index 337507f..943b122 100644 --- a/OmsiHook/OmsiComplMapObjInst.cs +++ b/OmsiHook/OmsiComplMapObjInst.cs @@ -24,27 +24,27 @@ public float EinsVar get => Memory.ReadMemory(Address + 0x1f0); set => Memory.WriteMemory(Address + 0x1f0, value); } - public float Unknown_A // TODO: Check Data Name + public float Unknown_OCMOI_A // TODO: Check Data Name { get => Memory.ReadMemory(Address + 0x1f4); set => Memory.WriteMemory(Address + 0x1f4, value); } - public float Unknown_B // TODO: Check Data Name + public float Unknown_OCMOI_B // TODO: Check Data Name { get => Memory.ReadMemory(Address + 0x1f8); set => Memory.WriteMemory(Address + 0x1f8, value); } - public float Unknown_C // TODO: Check Data Name + public float Unknown_OCMOI_C // TODO: Check Data Name { get => Memory.ReadMemory(Address + 0x1fc); set => Memory.WriteMemory(Address + 0x1fc, value); } - public float Unknown_D // TODO: Check Data Name + public float UUnknown_OCMOI_D // TODO: Check Data Name { get => Memory.ReadMemory(Address + 0x200); set => Memory.WriteMemory(Address + 0x200, value); } - public float Unknown_E // TODO: Check Data Name + public float Unknown_OCMOI_E // TODO: Check Data Name { get => Memory.ReadMemory(Address + 0x204); set => Memory.WriteMemory(Address + 0x204, value);