HaloMap.RawData.PRTM.Read C# (CSharp) Method

Read() public method

The read.
public Read ( int TagIndex, Map map, bool dontreadraw ) : void
TagIndex int The TagIndex.
map HaloMap.Map.Map The map.
dontreadraw bool The dontreadraw.
return void
        public override void Read(int TagIndex, Map map, bool dontreadraw)
        {
            RawDataChunk Raw = new RawDataChunk();
            Raw.rawDataType = RawDataType.PRTM;
            Raw.pointerMetaOffset = 160;
            map.BR.BaseStream.Position = map.MetaInfo.Offset[TagIndex] + 160;
            Raw.offset = map.BR.ReadInt32();
            Raw.size = map.BR.ReadInt32();
            map.Functions.ParsePointer(ref Raw.offset, ref Raw.rawLocation);
            if (dontreadraw == false)
            {
                map.OpenMap(Raw.rawLocation);
                map.BR.BaseStream.Position = Raw.offset;
                Raw.MS = new MemoryStream(Raw.size);
                Raw.MS.Write(map.BR.ReadBytes(Raw.size), 0, Raw.size);
                map.OpenMap(MapTypes.Internal);
            }

            this.rawChunks.Add(Raw);
        }