Skip to content
0.2.0-dev Download ZIP
17 lines ·650 B Raw
1namespace EvilEngine.Adapters.Unreal.Unreal3;
2
3public sealed record Ue3Layout(string Name, int FileVersion, int Licensee, bool WideOffsets, bool ChunkListInHeader)
4{
5 public static readonly Ue3Layout Udk = new("UDK", 868, 0, false, false);
6
7 public static readonly Ue3Layout Psyonix = new("Psyonix's", 868, 28, true, true);
8
9 public static IReadOnlyList<Ue3Layout> Known { get; } = [Udk, Psyonix];
10
11 public int ChunkSize => WideOffsets ? 24 : 16;
12
13 public static Ue3Layout? For(int fileVersion, int licensee)
14 {
15 return Known.FirstOrDefault(layout => layout.FileVersion == fileVersion && layout.Licensee == licensee);
16 }
17}