Just last little bits of polish
Some checks failed
Build / Build Game (push) Has been cancelled

This commit is contained in:
2026-03-01 03:19:49 -05:00
parent 45ee9a7d11
commit f594ba3889
16 changed files with 128 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
#include "resources.hpp"
#include "util/preferences.hpp"
#include "log.hpp"
using namespace game::resource;
using namespace game::util;
@@ -12,7 +13,19 @@ namespace game
for (int i = 0; i < shader::COUNT; i++)
shaders[i] = Shader(shader::INFO[i].vertex, shader::INFO[i].fragment);
for (auto& entry : std::filesystem::recursive_directory_iterator("resources/characters"))
std::string CHARACTERS_DIRECTORY{"resources/characters"};
std::error_code ec{};
if (!std::filesystem::is_directory(CHARACTERS_DIRECTORY, ec))
{
if (ec)
logger.warning("Failed to read characters directory: " + CHARACTERS_DIRECTORY + " (" + ec.message() + ")");
else
logger.warning("Characters directory not found: " + CHARACTERS_DIRECTORY);
return;
}
for (auto& entry : std::filesystem::recursive_directory_iterator(CHARACTERS_DIRECTORY))
if (entry.is_regular_file() && entry.path().extension() == ".zip") characterPreviews.emplace_back(entry.path());
characters.resize(characterPreviews.size());
}