rework some of the friend-dependent access to FResourceLump.
This commit is contained in:
parent
ebc808e2a9
commit
df56fc65e0
12 changed files with 42 additions and 47 deletions
|
|
@ -176,9 +176,9 @@ protected:
|
|||
class FResourceFile
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
FileReader Reader;
|
||||
const char* FileName;
|
||||
protected:
|
||||
uint32_t NumLumps;
|
||||
char Hash[48];
|
||||
StringPool* stringpool;
|
||||
|
|
@ -206,6 +206,7 @@ public:
|
|||
virtual ~FResourceFile();
|
||||
// If this FResourceFile represents a directory, the Reader object is not usable so don't return it.
|
||||
FileReader *GetContainerReader() { return Reader.isOpen()? &Reader : nullptr; }
|
||||
const char* GetFileName() const { return FileName; }
|
||||
[[deprecated]] uint32_t LumpCount() const { return NumLumps; }
|
||||
uint32_t GetFirstEntry() const { return FirstLump; }
|
||||
void SetFirstLump(uint32_t f) { FirstLump = f; }
|
||||
|
|
@ -247,6 +248,13 @@ public:
|
|||
return l->GetRawData();
|
||||
}
|
||||
|
||||
FileReader Destroy()
|
||||
{
|
||||
auto fr = std::move(Reader);
|
||||
delete this;
|
||||
return fr;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue