Get rid of FUncompressedFile::Lumps
(RFF is inoperable in this commit!)
This commit is contained in:
parent
27a356814c
commit
854097024f
8 changed files with 36 additions and 166 deletions
|
|
@ -72,8 +72,7 @@ bool FSSIFile::Open(int version, int EntryCount, LumpFilterInfo*)
|
|||
{
|
||||
AllocateEntries(EntryCount*2);
|
||||
NumLumps = EntryCount*2;
|
||||
Lumps.Resize(EntryCount*2);
|
||||
|
||||
|
||||
|
||||
int32_t j = (version == 2 ? 267 : 254) + (EntryCount * 121);
|
||||
for (uint32_t i = 0; i < NumLumps; i+=2)
|
||||
|
|
@ -108,23 +107,6 @@ bool FSSIFile::Open(int version, int EntryCount, LumpFilterInfo*)
|
|||
Entries[i + 1].Method = METHOD_STORED;
|
||||
if (strstr(fn, ".GRP")) Entries[i + 1].Flags |= RESFF_EMBEDDED;
|
||||
|
||||
// swap back...
|
||||
std::swap(fn[strlength - 1], fn[strlength - 3]);
|
||||
Lumps[i].LumpNameSetup(fn, stringpool);
|
||||
Lumps[i].Position = j;
|
||||
Lumps[i].LumpSize = flength;
|
||||
Lumps[i].Owner = this;
|
||||
if (strstr(fn, ".GRP")) Lumps[i].Flags |= LUMPF_EMBEDDED;
|
||||
|
||||
// SSI files can swap the order of the extension's characters - but there's no reliable detection for this and it can be mixed inside the same container,
|
||||
// so we have no choice but to create another file record for the altered name.
|
||||
std::swap(fn[strlength - 1], fn[strlength - 3]);
|
||||
Lumps[i+1].LumpNameSetup(fn, stringpool);
|
||||
Lumps[i+1].Position = j;
|
||||
Lumps[i+1].LumpSize = flength;
|
||||
Lumps[i+1].Owner = this;
|
||||
if (strstr(fn, ".GRP")) Lumps[i+1].Flags |= LUMPF_EMBEDDED;
|
||||
|
||||
j += flength;
|
||||
|
||||
Reader.Seek(104, FileReader::SeekCur);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue