mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
50
Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs
Normal file
50
Brutal.Fmod/FmodStudioApi/Manual/Structs/UserProperty.cs
Normal file
|
|
@ -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