Migrate many models to StructLayout

This commit is contained in:
Matt Nadareski
2024-04-23 13:30:43 -04:00
parent b19dbf2254
commit c636d3252b
112 changed files with 1044 additions and 646 deletions

View File

@@ -1,31 +1,33 @@
namespace SabreTools.Models.SafeDisc
using System.Runtime.InteropServices;
namespace SabreTools.Models.SafeDisc
{
/// <see href="http://blog.w4kfu.com/tag/safedisc"/>
[StructLayout(LayoutKind.Sequential)]
public class EncryptedFileEntry
{
/// <summary>
/// 0xA8726B03
/// </summary>
public uint Signature1 { get; set; }
public uint Signature1;
/// <summary>
/// 0xEF01996C
/// </summary>
public uint Signature2 { get; set; }
public uint Signature2;
public uint FileNumber { get; set; }
public uint FileNumber;
public uint Offset1 { get; set; }
public uint Offset1;
public uint Offset2 { get; set; }
public uint Offset2;
public uint Unknown1 { get; set; }
public uint Unknown1;
public uint Unknown2 { get; set; }
public uint Unknown2;
/// <remarks>
/// 0x0D bytes
/// </remarks>
public byte[]? Name { get; set; }
/// <remarks>0x0D bytes</remarks>
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x0D)]
public byte[]? Name;
}
}