- Add Debugstuff to main - Add IsType and AutoLoad to AssetManager - Add ID class for at compile time hashing - Add A8 to image (but not supported yet) - Fix error in Vertex constructor - Add PathClear to PathFill func - Add pCheckSize to check for overflows - Make Tex in Texture a pointer ref - Add default uv to texture - Add own c++ exception - Add FNV32 Hash func (compile and runtime) - Fix Power2 check in texture loader - Load Shader manualy in iron (cause it seems not working correctly with files)
21 lines
640 B
C++
21 lines
640 B
C++
#include <amethyst/assets.hpp>
|
|
#include <amethyst/c3d.hpp>
|
|
#include <amethyst/texture.hpp>
|
|
|
|
namespace Amy {
|
|
void AssetMgr::AutoLoad(const ID& id, ksr path) {
|
|
if (path.ends_with(".png") || path.ends_with(".jpg") ||
|
|
path.ends_with(".bmp")) {
|
|
Texture* tex = new Texture();
|
|
tex->Load(path);
|
|
Add(id, tex);
|
|
} else if (path.ends_with(".shbin")) {
|
|
C3D::Shader* shader = new C3D::Shader();
|
|
shader->Load(path);
|
|
Add(id, shader);
|
|
} else {
|
|
throw std::runtime_error("[amy]: assets: " + id.GetName() + " (" + path +
|
|
") is unsupported for AssetMgr::AutoLoad!");
|
|
}
|
|
}
|
|
} // namespace Amy
|