mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 05:28:25 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
2 changed files with 768360 additions and 0 deletions
12
brutal.fmod/Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs
Normal file
12
brutal.fmod/Brutal.Fmod/FmodStudioApi/Manual/FmodStudio.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Brutal.FmodApi.Studio;
|
||||
|
||||
public static partial class FmodStudio
|
||||
{
|
||||
static FmodStudio()
|
||||
{
|
||||
// Load required dependency on fmod core lib prior to any studio LibraryImport
|
||||
NativeLibrary.Load("fmod", typeof(FmodStudio).Assembly, DllImportSearchPath.AssemblyDirectory);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Brutal.FmodApi.Studio;
|
||||
|
||||
/// <summary>
|
||||
/// UserProperty struct. The Value field is a union of different types at the same address, only
|
||||
/// one should be set at a time.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
public unsafe struct UserProperty
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(0)]
|
||||
public byte* Name;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(8)]
|
||||
public UserPropertyType Type;
|
||||
|
||||
// Explicit alignment of each Value field in the 'union' to the same address
|
||||
// Union aligned to the next 8 byte increment due to C++ alignment of its largest type (pointer)
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(16)]
|
||||
public int IntValue;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(16)]
|
||||
public bool BoolValue;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(16)]
|
||||
public float FloatValue;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[FieldOffset(16)]
|
||||
public byte* StringValue;
|
||||
}
|
||||
Loading…
Reference in a new issue