TerrainDisplay.MPQ.WMO.WMORootParser.AdvanceToNextChunk C# (CSharp) Method

AdvanceToNextChunk() static private method

static private AdvanceToNextChunk ( BinaryReader br, long curPos, uint &type, uint &size ) : long
br System.IO.BinaryReader
curPos long
type uint
size uint
return long
        static long AdvanceToNextChunk(BinaryReader br, long curPos, ref uint type, ref uint size)
        {
            br.BaseStream.Seek(curPos + size, SeekOrigin.Begin);
            if (br.BaseStream.Position == br.BaseStream.Length)
            {
                return br.BaseStream.Length;
            }

            type = br.ReadUInt32();
            size = br.ReadUInt32();
            long newCurPos = br.BaseStream.Position;
            return newCurPos;
        }