- got rid of FileSystem::GetFileData.

Using FMemFile is better in all these places.
This commit is contained in:
Christoph Oelckers 2023-08-19 16:49:07 +02:00
commit 5398045f7d
14 changed files with 50 additions and 84 deletions

View file

@ -140,15 +140,15 @@ int FQOITexture::CopyPixels(FBitmap *bmp, int conversion)
constexpr auto QOI_COLOR_HASH = [](PalEntry C) { return (C.r * 3 + C.g * 5 + C.b * 7 + C.a * 11); };
auto lump = fileSystem.OpenFileReader(SourceLump);
auto bytes = lump.Read();
if (bytes.size() < 22) return 0; // error
auto lump = fileSystem.ReadFile(SourceLump);
if (lump.GetSize() < 22) return 0; // error
PalEntry index[64] = {};
PalEntry pe = 0xff000000;
size_t p = 14, run = 0;
size_t chunks_len = bytes.size() - 8;
size_t chunks_len = lump.GetSize() - 8;
auto bytes = (const uint8_t*)lump.GetMem();
for (int h = 0; h < Height; h++)
{