Refactor + render animation tweaks + updated frame properties + bug fixes

This commit is contained in:
2025-12-17 23:02:00 -05:00
parent b4b4fe3714
commit 119bbc4081
63 changed files with 1964 additions and 1701 deletions
+5 -5
View File
@@ -22,13 +22,13 @@
#pragma GCC diagnostic pop
#endif
#include "filesystem_.h"
#include "file_.h"
#include "math_.h"
using namespace anm2ed::resource::texture;
using namespace anm2ed::util::math;
using namespace anm2ed::util;
using namespace glm;
namespace filesystem = anm2ed::util::filesystem;
namespace anm2ed::resource
{
@@ -119,10 +119,10 @@ namespace anm2ed::resource
Texture::Texture(const std::filesystem::path& pngPath)
{
filesystem::File file(pngPath, "rb");
File file(pngPath, "rb");
if (auto handle = file.get())
{
if (const uint8_t* data = stbi_load_from_file(handle, &size.x, &size.y, nullptr, CHANNELS); data)
if (auto data = stbi_load_from_file(handle, &size.x, &size.y, nullptr, CHANNELS); data)
{
upload(data);
stbi_image_free((void*)data);
@@ -134,7 +134,7 @@ namespace anm2ed::resource
{
if (pixels.empty()) return false;
filesystem::File file(path, "wb");
File file(path, "wb");
if (auto handle = file.get())
{
auto write_func = [](void* context, void* data, int size) { fwrite(data, 1, size, static_cast<FILE*>(context)); };