Remove assets from repository and download them using xmake

This commit is contained in:
SirLynix
2022-05-27 08:34:36 +02:00
parent 03e2801dbe
commit 5507b98f2f
51 changed files with 189 additions and 313 deletions

View File

@@ -1,15 +1,15 @@
#include <filesystem>
std::filesystem::path GetResourceDir()
std::filesystem::path GetAssetDir()
{
static std::filesystem::path resourceDir = []
{
std::filesystem::path dir = "resources";
if (!std::filesystem::is_directory(dir) && std::filesystem::is_directory(".." / dir))
return ".." / dir;
else
return dir;
std::filesystem::path dir = "assets";
if (!std::filesystem::is_directory(dir) && std::filesystem::is_directory("../.." / dir))
dir = "../.." / dir;
return dir / "tests";
}();
return resourceDir;
}