private void WriteFileTable(KOARBinaryWriter bw) { bw.WriteInt(_fileTable.Count); UInt32 offset = (UInt32)(bw.GetOffset() + _fileTable.Count * 20); foreach (BigFileEntryBase file in _fileTable) { byte[] buffer = file.GetBytes(); Int32 size = buffer.Length; bw.WriteInt(size); // TODO: add compression file.SetRaw(true); bw.WriteInt(size); bw.WriteUInt(offset); bw.WriteUInt(file.FileID); bw.WriteUInt(file.Flags); bw.SavePosition(); bw.SetOffset(offset); bw.Write(buffer); offset = (UInt32)bw.GetOffset(); bw.LoadPosition(); } }
private void WriteHeader(KOARBinaryWriter bw) { bw.Write(Big.SIGNATURE); bw.WriteUInt(_version); bw.WriteByte(1); bw.WriteString(this.BuildString); bw.WriteUInt(0x20); }