Пример #1
0
        public void LoadBinaryData(byte[] inData)
        {
            using (MemoryStream ms = new MemoryStream(inData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    //read values
                    this.Flags = (TerrainHeaderFlags)br.ReadInt32();

                    this.MapChunkOffsetsOffset = br.ReadInt32();
                    this.TexturesOffset        = br.ReadInt32();

                    this.ModelsOffset       = br.ReadInt32();
                    this.ModelIndicesOffset = br.ReadInt32();

                    this.WorldModelObjectsOffset       = br.ReadInt32();
                    this.WorldModelObjectIndicesOffset = br.ReadInt32();

                    this.ModelPlacementInformationOffset            = br.ReadInt32();
                    this.WorldModelObjectPlacementInformationOffset = br.ReadInt32();

                    this.BoundingBoxOffset  = br.ReadInt32();
                    this.LiquidOffset       = br.ReadInt32();
                    this.TextureFlagsOffset = br.ReadInt32();
                }
            }
        }
Пример #2
0
        public void LoadBinaryData(byte[] inData)
        {
            using (MemoryStream ms = new MemoryStream(inData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    //read values
                    this.Flags = (TerrainHeaderFlags)br.ReadInt32();

                    this.MapChunkOffsetsOffset = br.ReadInt32();
                    this.TexturesOffset = br.ReadInt32();

                    this.ModelsOffset = br.ReadInt32();
                    this.ModelIndicesOffset = br.ReadInt32();

                    this.WorldModelObjectsOffset = br.ReadInt32();
                    this.WorldModelObjectIndicesOffset = br.ReadInt32();

                    this.ModelPlacementInformationOffset = br.ReadInt32();
                    this.WorldModelObjectPlacementInformationOffset = br.ReadInt32();

                    this.BoundingBoxOffset = br.ReadInt32();
                    this.LiquidOffset = br.ReadInt32();
                    this.TextureFlagsOffset = br.ReadInt32();
                }
            }
        }