public void WriteHeader(Stream output, int indexOffset, int indexSize)
        {
            output.WriteASCII("DBPF");
            DatabasePackedFileHeader header = new DatabasePackedFileHeader();

            header.MajorVersion = this.Version.Major;
            header.MinorVersion = this.Version.Minor;
            header.Always3      = 3;
            header.IndexCount   = this.Indices.Count(idx => idx.Deleted == false);
            header.IndexOffset  = indexOffset;
            header.IndexSize    = indexSize;

            byte[] data = StructureToBytes(header);
            output.Write(data, 0, data.Length);
        }
示例#2
0
        public void WriteHeader(Stream output, int indexOffset, int indexSize)
        {
            output.WriteASCII("DBPF");
            DatabasePackedFileHeader header = new DatabasePackedFileHeader();
            header.MajorVersion = this.Version.Major;
            header.MinorVersion = this.Version.Minor;
            header.Always3 = 3;
            header.IndexCount = this.Indices.Count;
            header.IndexOffset = indexOffset;
            header.IndexSize = indexSize;

            byte[] data = StructureToBytes(header);
            output.Write(data, 0, data.Length);
        }