| 25 | } |
| 26 | |
| 27 | static std::vector<uint8_t> LoadFile(const char* name) |
| 28 | { |
| 29 | auto lump = WidgetResources->FindEntry(name); |
| 30 | if (lump == -1) |
| 31 | I_FatalError("Unable to find %s", name); |
| 32 | |
| 33 | auto reader = WidgetResources->GetEntryReader(lump, FileSys::READER_SHARED); |
| 34 | std::vector<uint8_t> buffer(reader.GetLength()); |
| 35 | reader.Read(buffer.data(), buffer.size()); |
| 36 | return buffer; |
| 37 | } |
| 38 | |
| 39 | // this must be allowed to fail without throwing. |
| 40 | static std::vector<uint8_t> LoadDiskFile(const char* name) |
no test coverage detected