streamline the buffer readers.

This commit is contained in:
Christoph Oelckers 2023-12-13 18:17:12 +01:00
commit 78a71bb662
5 changed files with 30 additions and 46 deletions

View file

@ -301,7 +301,8 @@ bool FileSystem::InitMultipleFiles (std::vector<std::string>& filenames, LumpFil
int FileSystem::AddFromBuffer(const char* name, char* data, int size, int id, int flags)
{
FileReader fr;
fr.OpenMemoryArray((uint8_t*)data, size);
FileData blob(data, size);
fr.OpenMemoryArray(blob);
// wrap this into a single lump resource file (should be done a little better later.)
auto rf = new FResourceFile(name, fr, stringpool);