using System.IO;
using System.Runtime.InteropServices;
namespace MindPowerSdk
{
///
///
///
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct MPMapFileHeader
{
///
/// 类型标识 = 780624
///
public int MapFlag { get; private set; }
///
/// 地图宽度
///
public int Width { get; private set; }
///
/// 地图高度
///
public int Height { get; private set; }
///
/// 每个Section(部分)宽度
///
public int SectionWidth { get; private set; }
///
/// 每个Section(部分)高度
///
public int SectionHeight { get; private set; }
public static MPMapFileHeader Load(BinaryReader reader)
{
MPMapFileHeader header = default;
header.MapFlag = reader.ReadInt32();
header.Width = reader.ReadInt32();
header.Height = reader.ReadInt32();
header.SectionWidth = reader.ReadInt32();
header.SectionHeight = reader.ReadInt32();
return header;
}
}
}