Initial commit
This commit is contained in:
commit
0f86b0434b
38 changed files with 2370 additions and 0 deletions
49
LibDgf/Aqualead/Archive/AlAarEntryV2.cs
Normal file
49
LibDgf/Aqualead/Archive/AlAarEntryV2.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace LibDgf.Aqualead.Archive
|
||||
{
|
||||
public class AlAarEntryV2
|
||||
{
|
||||
uint rest;
|
||||
|
||||
public uint Id { get; set; }
|
||||
public uint Offset { get; set; }
|
||||
public uint Length { get; set; }
|
||||
public uint Range
|
||||
{
|
||||
get
|
||||
{
|
||||
return rest & 0xffffff;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value > 0xffffff) throw new ArgumentOutOfRangeException(nameof(value));
|
||||
rest = value | (rest & 0xff000000);
|
||||
}
|
||||
}
|
||||
public AlAarEntryFlags Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
return (AlAarEntryFlags)((rest >> 24) & 0xff);
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((uint)value > 0xff) throw new ArgumentOutOfRangeException(nameof(value));
|
||||
rest = ((uint)value << 24) | (rest & 0xffffff);
|
||||
}
|
||||
}
|
||||
public string Name { get; set; }
|
||||
|
||||
public void Read(BinaryReader br)
|
||||
{
|
||||
Id = br.ReadUInt32();
|
||||
Offset = br.ReadUInt32();
|
||||
Length = br.ReadUInt32();
|
||||
rest = br.ReadUInt32();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue