void LoadAreaData(BinaryReader reader, uint offset) { reader.BaseStream.Seek(offset, SeekOrigin.Begin); map_AreaHeader areaHeader = reader.ReadStruct <map_AreaHeader>(); _gridArea = areaHeader.gridArea; if (!areaHeader.flags.HasAnyFlag(AreaHeaderFlags.NoArea)) { _areaMap = new ushort[16 * 16]; for (var i = 0; i < _areaMap.Length; ++i) { _areaMap[i] = reader.ReadUInt16(); } } }
bool LoadAreaData(BinaryReader reader, uint offset) { reader.BaseStream.Seek(offset, SeekOrigin.Begin); map_AreaHeader areaHeader = reader.Read <map_AreaHeader>(); if (areaHeader.fourcc != MapConst.MapAreaMagic) { return(false); } _gridArea = areaHeader.gridArea; if (!areaHeader.flags.HasAnyFlag(AreaHeaderFlags.NoArea)) { _areaMap = reader.ReadArray <ushort>(16 * 16); } return(true); }