Ejemplo n.º 1
0
            public static Header Read(BinaryReader reader)
            {
                var header = new Header
                {
                    Identifier = reader.ReadInt32(),
                    Version    = reader.ReadInt32()
                };

                var lumpInfoBytes = reader.ReadBytes(LumpInfoCount * Marshal.SizeOf(typeof(LumpInfo)));
                var lumps         = LumpReader <LumpInfo> .ReadLump(lumpInfoBytes, 0, lumpInfoBytes.Length);

                header.Lumps       = lumps;
                header.MapRevision = reader.ReadInt32();

                return(header);
            }
Ejemplo n.º 2
0
            public static Header Read(BinaryReader reader)
            {
                var header = new Header
                {
                    Identifier = reader.ReadInt32(),
                    Version    = reader.ReadInt32()
                };

                var lumpInfoBytes = reader.ReadBytes(LumpInfoCount * Marshal.SizeOf(typeof(LumpInfo)));
                var lumps         = LumpReader <LumpInfo> .ReadLump(lumpInfoBytes, 0, lumpInfoBytes.Length);

                //for ( var i = 0; i < lumps.Length; ++i )
                //{
                //    lumps[i].IdentCode = ( LumpType )i;
                //}

                header.Lumps       = lumps;
                header.MapRevision = reader.ReadInt32();

                return(header);
            }