Load MPQ file overrides without StormLib

Also logs the overrides in verbose mode.
This commit is contained in:
Gleb Mazovetskiy 2021-10-23 10:12:14 +01:00
commit a97ffd1640
7 changed files with 57 additions and 64 deletions

View file

@ -4,7 +4,6 @@
#include "utils/file_util.h"
#include "utils/log.hpp"
#include "utils/stdcompat/optional.hpp"
#include "utils/sdl_ptrs.h"
#ifdef USE_SDL1
@ -22,6 +21,7 @@ std::optional<std::string> basePath;
std::optional<std::string> prefPath;
std::optional<std::string> configPath;
std::optional<std::string> assetsPath;
std::optional<std::string> mpqDir;
void AddTrailingSlash(std::string &path)
{
@ -92,6 +92,11 @@ const std::string &AssetsPath()
return *assetsPath;
}
const std::optional<std::string> &MpqDir()
{
return mpqDir;
}
void SetBasePath(const std::string &path)
{
basePath = path;