fix animation loading
This commit is contained in:
parent
5500fe34ac
commit
719135fe19
@ -194,6 +194,9 @@ void AssetsLoader::processPreloadConfigs(const Content* content) {
|
||||
return;
|
||||
}
|
||||
for (auto& entry : content->getPacks()) {
|
||||
if (entry.first == "core") {
|
||||
continue;
|
||||
}
|
||||
const auto& pack = entry.second;
|
||||
auto preloadFile = pack->getInfo().folder / fs::path("preload.json");
|
||||
if (fs::exists(preloadFile)) {
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include "coders/obj.hpp"
|
||||
#include "constants.hpp"
|
||||
#include "data/dynamic.hpp"
|
||||
#include "debug/Logger.hpp"
|
||||
#include "files/engine_paths.hpp"
|
||||
#include "files/files.hpp"
|
||||
#include "frontend/UiDocument.hpp"
|
||||
@ -26,6 +27,8 @@
|
||||
#include "Assets.hpp"
|
||||
#include "AssetsLoader.hpp"
|
||||
|
||||
static debug::Logger logger("assetload-funcs");
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
static bool animation(
|
||||
@ -263,7 +266,7 @@ static TextureAnimation create_animation(
|
||||
|
||||
for (const auto& elem : frameList) {
|
||||
if (!srcAtlas->has(elem.first)) {
|
||||
std::cerr << "Unknown frame name: " << elem.first << std::endl;
|
||||
logger.error() << "unknown frame name: " << elem.first;
|
||||
continue;
|
||||
}
|
||||
region = srcAtlas->get(elem.first);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user