Skip to content

Commit

Permalink
GAME: Add call path resolver
Browse files Browse the repository at this point in the history
PATCH
  • Loading branch information
Saverio976 committed Nov 4, 2023
1 parent 6ad23ac commit 52e6d34
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Game/ResourcesManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <boost/asio.hpp>
#include "B-luga/Json.hpp"
#include "B-luga/Logger.hpp"
#include "B-luga/PathResolver.hpp"
#include "ResourcesManager.hpp"
#include "boost/filesystem.hpp"

Expand Down Expand Up @@ -37,14 +38,14 @@ class ResourcesManager {

if (!init) {
for (const auto &path : paths) {
Json::getInstance().registerJsonFile(ResourcesManager::convertPath(path));
Json::getInstance().registerJsonFile(path);
}
init = true;
}
if (paths.size() <= static_cast<std::size_t>(type)) {
return "";
}
return ResourcesManager::convertPath(paths[static_cast<std::size_t>(type)]);
return paths[static_cast<std::size_t>(type)];
}

/**
Expand All @@ -66,6 +67,7 @@ class ResourcesManager {
getRessourcePath() = ResourcesManager::getRessourcePathNormal(path_tmp.string());
#endif
Logger::info("RESOURCE_MANAGER: Path Assets: " + getRessourcePath());
PathResolver::setResolver(ResourcesManager::convertPath);
}

/**
Expand Down

0 comments on commit 52e6d34

Please sign in to comment.