shp writer

This commit is contained in:
Chris Forbes
2011-01-22 21:16:12 +13:00
committed by Paul Chote
parent 848622054d
commit 1b3f769f34
5 changed files with 66 additions and 7 deletions

View File

@@ -26,6 +26,8 @@ namespace OpenRA.FileFormats
public byte[] Image;
public ImageHeader() { }
public ImageHeader( BinaryReader reader )
{
Offset = reader.ReadUInt32();
@@ -35,6 +37,15 @@ namespace OpenRA.FileFormats
RefOffset = reader.ReadUInt16();
RefFormat = (Format)reader.ReadUInt16();
}
public static readonly int SizeOnDisk = 8;
public void WriteTo(BinaryWriter writer)
{
writer.Write(Offset | ((uint)Format << 24));
writer.Write((ushort)RefOffset);
writer.Write((ushort)RefFormat);
}
}
public enum Format