using System.IO;
namespace BOTWToolset.IO
{
///
/// Contains data for .hght files.
///
public class HGHT
{
public ushort[] Heights;
///
/// Retrieves a array from a set of bytes.
///
/// The array of bytes to read.
/// array.
public static HGHT FromBytes(byte[] bytes)
{
using (var r = new BinaryReader(new MemoryStream(bytes)))
{
HGHT h = new HGHT
{
Heights = new ushort[r.BaseStream.Length / 2]
};
for (int i = 0; i < h.Heights.Length; i++)
{
h.Heights[i] = r.ReadUInt16();
}
return h;
}
}
}
}