3 #include <BLIB/Util/FileUtil.hpp>
10 using AnimationManager = bl::resource::ResourceManager<bl::gfx::a2d::AnimationData>;
13 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Walk/up.anim"), *
this)) {
19 bl::gfx::a2d::AnimationData temp;
20 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Walk/right.anim"), temp)) {
23 maxLen = std::max(maxLen, temp.getLength());
26 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Walk/down.anim"), temp)) {
29 maxLen = std::max(maxLen, temp.getLength());
32 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Walk/left.anim"), temp)) {
35 maxLen = std::max(maxLen, temp.getLength());
38 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Run/up.anim"), temp)) {
41 maxLen = std::max(maxLen, temp.getLength());
44 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Run/right.anim"), temp)) {
47 maxLen = std::max(maxLen, temp.getLength());
50 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Run/down.anim"), temp)) {
53 maxLen = std::max(maxLen, temp.getLength());
56 if (!AnimationManager::initializeExisting(FileUtil::joinPath(path,
"Run/left.anim"), temp)) {
59 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 &, RunWalkAnimations &result) override
Loads the walking animations from the given path.