Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Humans #18

Merged
merged 6 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OmsiHook/OmsiCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
121 changes: 121 additions & 0 deletions OmsiHook/OmsiComplMapObjInst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint>(Address + 0x1e4);
set => Memory.WriteMemory(Address + 0x1e4, value);
}
public OmsiObject MyFileObject
{
get => new(Memory, Address + 0x1e8);
}
public float EinsVar
{
get => Memory.ReadMemory<float>(Address + 0x1ec);
set => Memory.WriteMemory(Address + 0x1ec, value);
}
public float Debug // TODO: Check Data Type
{
get => Memory.ReadMemory<float>(Address + 0x1f0);
set => Memory.WriteMemory(Address + 0x1f0, value);
}
public float Unknown_OCMOI_A // TODO: Check Data Name
{
get => Memory.ReadMemory<float>(Address + 0x1f4);
set => Memory.WriteMemory(Address + 0x1f4, value);
}
public float Unknown_OCMOI_B // TODO: Check Data Name
{
get => Memory.ReadMemory<float>(Address + 0x1f8);
set => Memory.WriteMemory(Address + 0x1f8, value);
}
public float Unknown_OCMOI_C // TODO: Check Data Name
{
get => Memory.ReadMemory<float>(Address + 0x1fc);
set => Memory.WriteMemory(Address + 0x1fc, value);
}
public float UUnknown_OCMOI_D // TODO: Check Data Name
{
get => Memory.ReadMemory<float>(Address + 0x200);
set => Memory.WriteMemory(Address + 0x200, value);
}
public float Unknown_OCMOI_E // TODO: Check Data Name
{
get => Memory.ReadMemory<float>(Address + 0x204);
set => Memory.WriteMemory(Address + 0x204, value);
}
public string SoundItent
{
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x208), true);
}
public float FarbSchema
{
get => Memory.ReadMemory<float>(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<bool>(Address + 0x218);
set => Memory.WriteMemory(Address + 0x218, value);
}
public OmsiSoundPack SoundPack
{
get => new(Memory, Address + 0x21c);
}
public OmsiCamera[] ReflCameras
{
get => Memory.ReadMemoryObjArray<OmsiCamera>(Address + 0x220);
}
public byte Selected
{
get => Memory.ReadMemory<byte>(Address + 0x224);
set => Memory.WriteMemory(Address + 0x224, value);
}
public D3DColorValue AmbLight
{
get => Memory.ReadMemory<D3DColorValue>(Address + 0x225);
set => Memory.WriteMemory(Address + 0x225, value);
}
/* TODO:
public floatptr[] PublicVars_Int
{
get => Memory.ReadMemoryStructArray<floatptr>(Address + 0x238);
}
public floatptr[] PublicVars
{
get => Memory.ReadMemoryStructArray<floatptr>(Address + 0x23c);
}*/
public OmsiComplMapObjInst ScriptShareParent
{
get => new(Memory, Address + 0x240);
}
public float[] UserVars
{
get => Memory.ReadMemoryStructArray<float>(Address + 0x244);
}
public int MyPathGroup
{
get => Memory.ReadMemory<int>(Address + 0x248);
set => Memory.WriteMemory(Address + 0x248, value);
}
public float OutsideVol
{
get => Memory.ReadMemory<float>(Address + 0x24c);
set => Memory.WriteMemory(Address + 0x24c, value);
}
public bool CollFeedback_Activ
{
get => Memory.ReadMemory<bool>(Address + 0x250);
set => Memory.WriteMemory(Address + 0x250, value);
}
public OmsiCollFeedback[] CollFeedbacks
{
get => Memory.ReadMemoryStructArray<OmsiCollFeedback>(Address + 0x254);
}
}
}
143 changes: 143 additions & 0 deletions OmsiHook/OmsiHumanBeing.cs
Original file line number Diff line number Diff line change
@@ -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<float>(Address + 0x268);
set => Memory.WriteMemory(Address + 0x268, value);
}
public float AssHeight
{
get => Memory.ReadMemory<float>(Address + 0x26c);
set => Memory.WriteMemory(Address + 0x26c, value);
}
public float Height
{
get => Memory.ReadMemory<float>(Address + 0x270);
set => Memory.WriteMemory(Address + 0x270, value);
}
public float FeetDist
{
get => Memory.ReadMemory<float>(Address + 0x274);
set => Memory.WriteMemory(Address + 0x274, value);
}
public D3DVector Shoulder
{
get => Memory.ReadMemory<D3DVector>(Address + 0x278);
set => Memory.WriteMemory(Address + 0x278, value);
}
public D3DVector Elbow
{
get => Memory.ReadMemory<D3DVector>(Address + 0x284);
set => Memory.WriteMemory(Address + 0x284, value);
}
public D3DVector Carpus
{
get => Memory.ReadMemory<D3DVector>(Address + 0x290);
set => Memory.WriteMemory(Address + 0x290, value);
}
public D3DVector Finger
{
get => Memory.ReadMemory<D3DVector>(Address + 0x29c);
set => Memory.WriteMemory(Address + 0x29c, value);
}
public D3DVector Neck
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2a8);
set => Memory.WriteMemory(Address + 0x2a8, value);
}
public D3DVector Waist
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2b4);
set => Memory.WriteMemory(Address + 0x2b4, value);
}
public D3DVector Hip
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2c0);
set => Memory.WriteMemory(Address + 0x2c0, value);
}
public D3DVector Knee
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2cc);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
/// <summary>
/// Incriment
/// </summary>
public float Anim_Walk_Schritteweite
{
get => Memory.ReadMemory<float>(Address + 0x2d8);
set => Memory.WriteMemory(Address + 0x2d8, value);
}
/// <summary>
/// Arm Swing?
/// </summary>
public float Anim_Walk_ArmSchwing
{
get => Memory.ReadMemory<float>(Address + 0x2dc);
set => Memory.WriteMemory(Address + 0x2dc, value);
}
/// <summary>
/// Hips?
/// </summary>
public float Anim_Walk_Huefte
{
get => Memory.ReadMemory<float>(Address + 0x2e0);
set => Memory.WriteMemory(Address + 0x2e0, value);
}
/// <summary>
/// Waist?
/// </summary>
public float Anim_Walk_Taille
{
get => Memory.ReadMemory<float>(Address + 0x2e4);
set => Memory.WriteMemory(Address + 0x2e4, value);
}
public float Anim_Walk_Upper_Arm_Beta
{
get => Memory.ReadMemory<float>(Address + 0x2e8);
set => Memory.WriteMemory(Address + 0x2e8, value);
}
public D3DVector UA_L_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2ec);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
public D3DVector UA_R_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x2f8);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
public D3DVector OA_L_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x304);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
public D3DVector OA_R_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x310);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
public D3DVector OS_L_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x31c);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
public D3DVector OS_R_Vec
{
get => Memory.ReadMemory<D3DVector>(Address + 0x328);
set => Memory.WriteMemory(Address + 0x2cc, value);
}
}
}
20 changes: 20 additions & 0 deletions OmsiHook/OmsiSound.cs
Original file line number Diff line number Diff line change
@@ -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<DirectSound8>(Address + 0x4);
set => Memory.WriteMemory(Address + 0x4, value);
}*/
public string FileName
{
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x8));
set => Memory.WriteMemory(Address + 0x8, value);
}

}
}
79 changes: 79 additions & 0 deletions OmsiHook/OmsiSoundPack.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
namespace OmsiHook
{
public class OmsiSoundPack : OmsiObject
{
internal OmsiSoundPack(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { }
internal OmsiSoundPack() : base() { }

/*public DirectSound8 Device
{
get => Memory.ReadMemory<DirectSound8>(Address + 0x4);
set => Memory.WriteMemory(Address + 0x4, value);
}*/
public string FileName
{
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x8));
set => Memory.WriteMemory(Address + 0x8, value);
}
public bool AI
{
get => Memory.ReadMemory<bool>(Address + 0xc);
set => Memory.WriteMemory(Address + 0xc, value);
}
public string Path
{
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x10));
set => Memory.WriteMemory(Address + 0x10, value);
}
public int SoundCount
{
get => Memory.ReadMemory<int>(Address + 0x14);
set => Memory.WriteMemory(Address + 0x14, value);
}
public OmsiSound[] Sounds
{
get => Memory.ReadMemoryObjArray<OmsiSound>(Address + 0x18);
}
public float RefRange
{
get => Memory.ReadMemory<float>(Address + 0x1c);
set => Memory.WriteMemory(Address + 0x1c, value);
}
/* TODO:
public floatptr[] Vars
{
get => Memory.ReadMemoryStructArray<floatptr>(Address + 0x20);
}*/
public D3DMatrix KoordSystem
{
get => Memory.ReadMemory<D3DMatrix>(Memory.ReadMemory<int>(Address + 0x24));
set => Memory.WriteMemory(Memory.ReadMemory<int>(Address + 0x24), value);
}
public bool Loaded
{
get => Memory.ReadMemory<bool>(Address + 0x28);
set => Memory.WriteMemory(Address + 0x28, value);
}
public float Dist
{
get => Memory.ReadMemory<float>(Address + 0x2c);
set => Memory.WriteMemory(Address + 0x2c, value);
}
public string SoundIdent
{
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x30), true);
set => Memory.WriteMemory(Address + 0x30, value);
}
public bool TooFar
{
get => Memory.ReadMemory<bool>(Address + 0x34);
set => Memory.WriteMemory(Address + 0x34, value);
}
public bool Stopped_TooFar
{
get => Memory.ReadMemory<bool>(Address + 0x35);
set => Memory.WriteMemory(Address + 0x35, value);
}

}
}
6 changes: 6 additions & 0 deletions OmsiHook/OmsiStructs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -893,4 +893,10 @@ public struct OmsiTriggerBox
public float reverb_time;
public float reverb_dist;
}

public struct OmsiCollFeedback
{
public D3DVector position;
public float energie;
}
}