mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
feat: animation track as asset (WIP)
This commit is contained in:
parent
df5bc1f9fe
commit
104c74e653
10 changed files with 86 additions and 24 deletions
|
|
@ -23,6 +23,7 @@
|
|||
#include "graphics/core/Shader.hpp"
|
||||
#include "graphics/core/Texture.hpp"
|
||||
#include "graphics/core/TextureAnimation.hpp"
|
||||
#include "logic/scripting/scripting.hpp"
|
||||
#include "io/io.hpp"
|
||||
#include "util/stringutil.hpp"
|
||||
|
||||
|
|
@ -44,6 +45,20 @@ static bool load_animated_texture(
|
|||
Atlas* dstAtlas
|
||||
);
|
||||
|
||||
assetload::postfunc assetload::animation(
|
||||
AssetsLoader&,
|
||||
const ResPaths& paths,
|
||||
const std::string& filename,
|
||||
const std::string& name,
|
||||
const std::shared_ptr<AssetCfg>&
|
||||
) {
|
||||
auto path = paths.find(filename + ".vca");
|
||||
if (io::is_regular_file(path)) {
|
||||
scripting::load_vca_animation(path, name);
|
||||
}
|
||||
return [](auto&) {};
|
||||
}
|
||||
|
||||
assetload::postfunc assetload::texture(
|
||||
AssetsLoader&,
|
||||
const ResPaths& paths,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue