| 28 | }; |
| 29 | |
| 30 | inline std::string fixPath(const std::string_view str) { |
| 31 | std::string result(str); |
| 32 | std::ranges::replace(result, '/', '\\'); |
| 33 | if (result.starts_with('\\')) { |
| 34 | return result.substr(1); |
| 35 | } |
| 36 | |
| 37 | return result; |
| 38 | } |
| 39 | |
| 40 | MPQStream::MPQStream(HANDLE mpq, const std::string &fileName) { |
| 41 | if (!SFileOpenFileEx(mpq, fileName.c_str(), SFILE_OPEN_FROM_MPQ, &_mpqFile)) { |