3 #include <BLIB/Util/FileUtil.hpp>
10 using AnimationManager = bl::resource::ResourceManager<bl::gfx::a2d::AnimationData>;
13 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"up.anim"), *
this)) {
19 bl::gfx::a2d::AnimationData temp;
20 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"right.anim"), temp)) {
23 maxLen = std::max(maxLen, temp.getLength());
26 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"down.anim"), temp)) {
29 maxLen = std::max(maxLen, temp.getLength());
32 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"left.anim"), temp)) {
35 maxLen = std::max(maxLen, temp.getLength());
bl::resource::ResourceManager< bl::gfx::a2d::AnimationData > AnimationManager
Core classes and functionality for both the editor and game.
bl::util::FileUtil FileUtil
Extension of animation data that loads and combines the animations for each movement direction into a...
bool loadFromDirectory(const std::string &path)
Loads the walking animations from the given directory.
virtual bool load(const std::string &path, const char *, std::size_t, std::istream &, WalkAnimations &result) override
Loads the walking animations from the given path.