fix windows build
This commit is contained in:
parent
8a12ff5879
commit
94bae83de6
@ -761,7 +761,7 @@ void ContentLoader::load() {
|
||||
auto folder = pack->folder;
|
||||
|
||||
// Load world generators
|
||||
io::path generatorsDir = folder / fs::u8path("generators");
|
||||
io::path generatorsDir = folder / "generators";
|
||||
foreach_file(generatorsDir, [this](const io::path& file) {
|
||||
std::string name = file.stem();
|
||||
auto [packid, full, filename] = create_unit_id(pack->id, name);
|
||||
@ -816,7 +816,7 @@ void ContentLoader::load() {
|
||||
}
|
||||
|
||||
// Load skeletons
|
||||
io::path skeletonsDir = folder / fs::u8path("skeletons");
|
||||
io::path skeletonsDir = folder / "skeletons";
|
||||
foreach_file(skeletonsDir, [this](const io::path& file) {
|
||||
std::string name = pack->id + ":" + file.stem();
|
||||
std::string text = io::read_string(file);
|
||||
@ -875,7 +875,7 @@ void ContentLoader::loadScripts(Content& content) {
|
||||
);
|
||||
}
|
||||
// Load entity components
|
||||
io::path componentsDir = folder / fs::u8path("scripts/components");
|
||||
io::path componentsDir = folder / "scripts/components";
|
||||
foreach_file(componentsDir, [&pack](const io::path& file) {
|
||||
auto name = pack.id + ":" + file.stem();
|
||||
scripting::load_entity_component(
|
||||
|
||||
@ -326,8 +326,8 @@ void Engine::loadAssets() {
|
||||
}
|
||||
|
||||
static void load_configs(const io::path& root) {
|
||||
auto configFolder = root/io::path("config");
|
||||
auto bindsFile = configFolder/io::path("bindings.toml");
|
||||
auto configFolder = root / "config";
|
||||
auto bindsFile = configFolder / "bindings.toml";
|
||||
if (io::is_regular_file(bindsFile)) {
|
||||
Events::loadBindings(
|
||||
bindsFile.string(), io::read_string(bindsFile), BindType::BIND
|
||||
|
||||
@ -98,10 +98,8 @@ io::path EnginePaths::getNewScreenshotFile(const std::string& ext) {
|
||||
auto file = folder / ("screenshot-" + datetimestr + "." + ext);
|
||||
uint index = 0;
|
||||
while (io::exists(file)) {
|
||||
file = folder / fs::u8path(
|
||||
"screenshot-" + datetimestr + "-" +
|
||||
std::to_string(index) + "." + ext
|
||||
);
|
||||
file = folder / ("screenshot-" + datetimestr + "-" +
|
||||
std::to_string(index) + "." + ext);
|
||||
index++;
|
||||
}
|
||||
return file;
|
||||
|
||||
@ -45,7 +45,7 @@ static int l_get_list(lua::State* L) {
|
||||
const auto& folder = worlds[i];
|
||||
|
||||
auto root =
|
||||
json::parse(io::read_string(folder / fs::u8path("world.json")));
|
||||
json::parse(io::read_string(folder / "world.json"));
|
||||
const auto& versionMap = root["version"];
|
||||
int versionMajor = versionMap["major"].asInteger();
|
||||
int versionMinor = versionMap["minor"].asInteger();
|
||||
@ -59,8 +59,8 @@ static int l_get_list(lua::State* L) {
|
||||
if (!engine->isHeadless() && !AssetsLoader::loadExternalTexture(
|
||||
assets,
|
||||
icon,
|
||||
{worlds[i] / fs::path("icon.png"),
|
||||
worlds[i] / fs::path("preview.png")}
|
||||
{worlds[i] / "icon.png",
|
||||
worlds[i] / "preview.png"}
|
||||
)) {
|
||||
icon = "gui/no_world_icon";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user