-
Notifications
You must be signed in to change notification settings - Fork 3
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
+ OmsiSound Completed for @sjain882 #43
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace OmsiHook | ||
{ | ||
/// <summary> | ||
/// Defines a set of conditions based on various data types. | ||
/// </summary> | ||
public class OmsiBoolClass : OmsiObject | ||
{ | ||
internal OmsiBoolClass(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } | ||
public OmsiBoolClass() : base() { } | ||
|
||
public OmsiBoolClassCondiBool[] CondisBool | ||
{ | ||
get => Memory.ReadMemoryStructArray<OmsiBoolClassCondiBool>(Address + 0x4); | ||
} | ||
public OmsiBoolClassCondiInt[] CondisInt | ||
{ | ||
get => Memory.ReadMemoryStructArray<OmsiBoolClassCondiInt>(Address + 0x8); | ||
} | ||
public OmsiBoolClassCondiFloat[] CondisFloat | ||
{ | ||
get => Memory.ReadMemoryStructArray<OmsiBoolClassCondiFloat>(Address + 0xc); | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -7,17 +7,204 @@ public class OmsiSound : OmsiObject | |
{ | ||
internal OmsiSound(Memory omsiMemory, int baseAddress) : base(omsiMemory, baseAddress) { } | ||
public OmsiSound() : base() { } | ||
|
||
/*public DirectSound8 Device | ||
public string FileName | ||
{ | ||
get => Memory.ReadMemory<DirectSound8>(Address + 0x4); | ||
get => Memory.ReadMemoryString(Address + 0x4); | ||
set => Memory.WriteMemory(Address + 0x4, value); | ||
}*/ | ||
public string FileName | ||
} | ||
/// <summary> | ||
/// Pointer to an IDirectSound8 | ||
/// </summary> | ||
public int Device | ||
{ | ||
get => Memory.ReadMemoryString(Memory.ReadMemory<int>(Address + 0x8)); | ||
get => Memory.ReadMemory<int>(Address + 0x8); | ||
set => Memory.WriteMemory(Address + 0x8, value); | ||
} | ||
/// <summary> | ||
/// Pointer to an IDirectSoundBuffer8 | ||
/// </summary> | ||
public int SoundBuffer | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0xc); | ||
set => Memory.WriteMemory(Address + 0xc, value); | ||
} | ||
/// <summary> | ||
/// Pointer to an IDirectSoundFXWavesReverb8 | ||
/// </summary> | ||
public int FX_Hall | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0x10); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please cast to an |
||
set => Memory.WriteMemory(Address + 0x10, value); | ||
} | ||
public float FX_Hall_Gain | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x14); | ||
set => Memory.WriteMemory(Address + 0x14, value); | ||
} | ||
public float FX_Hall_Time | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x18); | ||
set => Memory.WriteMemory(Address + 0x18, value); | ||
} | ||
public bool Failed | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x1c); | ||
set => Memory.WriteMemory(Address + 0x1c, value); | ||
} | ||
public float[] InternVars | ||
{ | ||
get => Memory.ReadMemoryStructArray<float>(Address + 0x20); | ||
} | ||
public uint StartTime | ||
{ | ||
get => Memory.ReadMemory<uint>(Address + 0x24); | ||
set => Memory.WriteMemory(Address + 0x24, value); | ||
} | ||
public int BufferSize | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0x28); | ||
set => Memory.WriteMemory(Address + 0x28, value); | ||
} | ||
public float Prev_Volume | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x2c); | ||
set => Memory.WriteMemory(Address + 0x2c, value); | ||
} | ||
public int FreqVar | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0x30); | ||
set => Memory.WriteMemory(Address + 0x30, value); | ||
} | ||
public int SampleRate | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0x34); | ||
set => Memory.WriteMemory(Address + 0x34, value); | ||
} | ||
public float RefValue | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x38); | ||
set => Memory.WriteMemory(Address + 0x38, value); | ||
} | ||
public bool Loop | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x3c); | ||
set => Memory.WriteMemory(Address + 0x3c, value); | ||
} | ||
public bool Pitch | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x3d); | ||
set => Memory.WriteMemory(Address + 0x3d, value); | ||
} | ||
public bool Triggered | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x3e); | ||
set => Memory.WriteMemory(Address + 0x3e, value); | ||
} | ||
public bool CheckLoading | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x3f); | ||
set => Memory.WriteMemory(Address + 0x3f, value); | ||
} | ||
public bool OnlyOne | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x40); | ||
set => Memory.WriteMemory(Address + 0x40, value); | ||
} | ||
/// <summary> | ||
/// Only One _ Prohibition? | ||
/// </summary> | ||
public bool OnlyOne_Verbot | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x41); | ||
set => Memory.WriteMemory(Address + 0x41, value); | ||
} | ||
public bool Important | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x42); | ||
set => Memory.WriteMemory(Address + 0x42, value); | ||
} | ||
public string[] TriggerList | ||
{ | ||
get => Memory.ReadMemoryStringArray(Address + 0x44); | ||
} | ||
public bool StartTrigSnd | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x48); | ||
set => Memory.WriteMemory(Address + 0x48, value); | ||
} | ||
public byte Flag_Viewpoint | ||
{ | ||
get => Memory.ReadMemory<byte>(Address + 0x49); | ||
set => Memory.WriteMemory(Address + 0x49, value); | ||
} | ||
public bool Is3D | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x4a); | ||
set => Memory.WriteMemory(Address + 0x4a, value); | ||
} | ||
public D3DVector SndPos | ||
{ | ||
get => Memory.ReadMemory<D3DVector>(Address + 0x4b); | ||
set => Memory.WriteMemory(Address + 0x4b, value); | ||
} | ||
public float VolDist | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x58); | ||
set => Memory.WriteMemory(Address + 0x58, value); | ||
} | ||
public bool HasDir | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x5c); | ||
set => Memory.WriteMemory(Address + 0x5c, value); | ||
} | ||
public D3DVector Dir | ||
{ | ||
get => Memory.ReadMemory<D3DVector>(Address + 0x5d); | ||
set => Memory.WriteMemory(Address + 0x5d, value); | ||
} | ||
public float VolFaktor | ||
{ | ||
get => Memory.ReadMemory<float>(Address + 0x6c); | ||
set => Memory.WriteMemory(Address + 0x6c, value); | ||
} | ||
public int[] VolVars | ||
{ | ||
get => Memory.ReadMemoryStructArray<int>(Address + 0x70); | ||
} | ||
public OmsiFuncClass[] VolCurves | ||
{ | ||
get => Memory.ReadMemoryObjArray<OmsiFuncClass>(Address + 0x74); | ||
} | ||
public OmsiBoolClass BoolClass | ||
{ | ||
get => new(Memory, Memory.ReadMemory<int>(Address + 0x78)); | ||
} | ||
public bool Playing | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x7c); | ||
set => Memory.WriteMemory(Address + 0x7c, value); | ||
} | ||
public bool MayPlay | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x7d); | ||
set => Memory.WriteMemory(Address + 0x7d, value); | ||
} | ||
public bool Stopped_TooFar | ||
{ | ||
get => Memory.ReadMemory<bool>(Address + 0x7e); | ||
set => Memory.WriteMemory(Address + 0x7e, value); | ||
} | ||
/// <summary> | ||
/// Pointer to an IDirectSound3DBuffer | ||
/// </summary> | ||
public int Int3D | ||
{ | ||
get => Memory.ReadMemory<int>(Address + 0x80); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cast to |
||
set => Memory.WriteMemory(Address + 0x80, value); | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cast to an
IntPtr