38 lines
956 B
C#
38 lines
956 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StgSharp.Logic
|
|
{
|
|
/// <summary>
|
|
/// A pair of <see cref="bool"/> value
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 2)]
|
|
public struct Bool2
|
|
{
|
|
/// <summary>
|
|
/// A <see cref="ushort"/> value.
|
|
/// The lower byte is <see cref="bool0"/>,
|
|
/// and higher byte is <see cref="bool1"/>.
|
|
/// </summary>
|
|
[FieldOffset(0)] public ushort Value;
|
|
|
|
/// <summary>
|
|
/// The first <see cref="bool"/> value.
|
|
/// </summary>
|
|
[FieldOffset(0)] public bool bool0;
|
|
|
|
[FieldOffset(0)] public byte byte0;
|
|
|
|
/// <summary>
|
|
/// The second <see cref="bool"/> value.
|
|
/// </summary>
|
|
[FieldOffset(1)] public bool bool1;
|
|
|
|
[FieldOffset(1)] public bool byte1;
|
|
}
|
|
}
|