Add GTrace

Make Fonts an Asset
Add FormatMillis and FormatNanos
This commit is contained in:
2025-12-08 18:37:12 +01:00
parent 88e367a299
commit d85610a0bd
11 changed files with 298 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
#include <amethyst/assets.hpp>
#include <amethyst/c3d.hpp>
#include <amethyst/iron.hpp>
#include <amethyst/texture.hpp>
namespace Amy {
@@ -13,6 +14,10 @@ void AssetMgr::AutoLoad(const ID& id, ksr path) {
auto shader = C3D::Shader::New();
shader->Load(path);
Add(id, shader);
} else if (path.ends_with(".ttf")) {
auto font = Iron::Font::New();
font->LoadTTF(path);
Add(id, font);
} else {
throw std::runtime_error("[amy]: assets: " + id.GetName() + " (" + path +
") is unsupported for AssetMgr::AutoLoad!");