diff --git a/src/resourcefiles/resourcefile.cpp b/src/resourcefiles/resourcefile.cpp index 96bd50e0f..18a6b6f15 100644 --- a/src/resourcefiles/resourcefile.cpp +++ b/src/resourcefiles/resourcefile.cpp @@ -716,3 +716,24 @@ int FExternalLump::FillCache() return 1; } + +bool FMemoryFile::Open(bool quiet) +{ + FString name(ExtractFileBase(Filename)); + FString fname(ExtractFileBase(Filename, true)); + + Lumps = new FUncompressedLump[1]; // must use array allocator + uppercopy(Lumps->Name, name); + Lumps->Name[8] = 0; + Lumps->FullName = fname; + Lumps->Owner = this; + Lumps->Position = 0; + Lumps->LumpSize = Reader->GetLength(); + Lumps->Namespace = ns_global; + Lumps->Flags = 0; + Lumps->FullName = NULL; + NumLumps = 1; + return true; +} + + diff --git a/src/resourcefiles/resourcefile.h b/src/resourcefiles/resourcefile.h index 4cc93cd2e..f7cc806e2 100644 --- a/src/resourcefiles/resourcefile.h +++ b/src/resourcefiles/resourcefile.h @@ -160,24 +160,7 @@ struct FMemoryFile : public FUncompressedFile Reader = &mr; } - bool Open(bool quiet) - { - FString name(ExtractFileBase(Filename)); - FString fname(ExtractFileBase(Filename, true)); - - Lumps = new FUncompressedLump[1]; // must use array allocator - uppercopy(Lumps->Name, name); - Lumps->Name[8] = 0; - Lumps->FullName = fname; - Lumps->Owner = this; - Lumps->Position = 0; - Lumps->LumpSize = Reader->GetLength(); - Lumps->Namespace = ns_global; - Lumps->Flags = 0; - Lumps->FullName = NULL; - NumLumps = 1; - return true; - } + bool Open(bool quiet); }; @@ -185,4 +168,4 @@ struct FMemoryFile : public FUncompressedFile -#endif \ No newline at end of file +#endif