did some cleanup of the FResourceFile interface.
* making all members protected (but adding friend overrides for the classes which still need it) * allowing to read data without retrieving the FResourceLump object.
This commit is contained in:
parent
fc84579319
commit
ebc808e2a9
12 changed files with 128 additions and 92 deletions
|
|
@ -618,17 +618,16 @@ bool FResourceFile::FindPrefixRange(const char* filter, void *lumps, size_t lump
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FResourceLump *FResourceFile::FindLump(const char *name)
|
||||
int FResourceFile::FindEntry(const char *name)
|
||||
{
|
||||
for (unsigned i = 0; i < NumLumps; i++)
|
||||
{
|
||||
FResourceLump *lump = GetLump(i);
|
||||
if (!stricmp(name, lump->FullName))
|
||||
if (!stricmp(name, getName(i)))
|
||||
{
|
||||
return lump;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return -1;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue