fixed some filesystem issues with directories and compression.
This commit is contained in:
parent
efef4bdfd1
commit
273f7c55bc
10 changed files with 22 additions and 13 deletions
|
|
@ -148,13 +148,22 @@ bool FWadFile::Open(LumpFilterInfo*, FileSystemMessageFunc Printf)
|
|||
|
||||
Entries[i].FileName = nullptr;
|
||||
Entries[i].Position = isBigEndian ? BigLong(fileinfo[i].FilePos) : LittleLong(fileinfo[i].FilePos);
|
||||
Entries[i].Length = isBigEndian ? BigLong(fileinfo[i].Size) : LittleLong(fileinfo[i].Size);
|
||||
Entries[i].CompressedSize = Entries[i].Length = isBigEndian ? BigLong(fileinfo[i].Size) : LittleLong(fileinfo[i].Size);
|
||||
|
||||
Entries[i].Namespace = ns_global;
|
||||
Entries[i].Flags = ishigh? RESFF_SHORTNAME | RESFF_COMPRESSED : RESFF_SHORTNAME;
|
||||
Entries[i].Method = ishigh == 1? METHOD_LZSS : METHOD_STORED;
|
||||
Entries[i].FileName = stringpool->Strdup(n);
|
||||
// This doesn't set up the namespace yet.
|
||||
}
|
||||
for (uint32_t i = 0; i < NumLumps; i++)
|
||||
{
|
||||
if (Entries[i].Method == METHOD_LZSS)
|
||||
{
|
||||
// compressed size is implicit.
|
||||
Entries[i].CompressedSize = (i == NumLumps - 1 ? Reader.GetLength() : Entries[i + 1].Position) - Entries[i].Position;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GenerateHash(); // Do this before the lump processing below.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue