Finally renamed animate2 to animation thus completing the refactor. There's still things to do to make the new animation actually work though.

This commit is contained in:
Zed A. Shaw 2026-02-24 11:36:57 -05:00
parent 83f62e3f45
commit 81a282d544
21 changed files with 83 additions and 339 deletions

View file

@ -5,7 +5,7 @@
#include "shaders.hpp"
#include "backend.hpp"
#include "constants.hpp"
#include "animate2.hpp"
#include "animation.hpp"
#include "tools/animator.hpp"
#include <unistd.h>
#include <ranges>
@ -124,7 +124,7 @@ namespace animator {
void FSM::check_update() {
if($timer.getElapsedTime().toDuration() > 500ms) {
try {
auto mod_time = std::filesystem::last_write_time("assets/animate2.json");
auto mod_time = std::filesystem::last_write_time("assets/animation.json");
if($last_mod_time < mod_time) {
event(Event::RELOAD);
@ -139,10 +139,10 @@ namespace animator {
}
void FSM::reload() {
animate2::Animate2 new_anim;
animation::Animation new_anim;
try {
new_anim = animate2::load("assets/animate2.json", $anim_name);
new_anim = animation::load("assets/animation.json", $anim_name);
} catch(...) {
$ui.show_error("Failed to load JSON");
return;
@ -157,7 +157,7 @@ namespace animator {
new_anim.set_form($cur_form);
try {
$last_mod_time = std::filesystem::last_write_time("assets/animate2.json");
$last_mod_time = std::filesystem::last_write_time("assets/animation.json");
} catch(...) {
$ui.show_error("Filesystem error");
}
@ -262,7 +262,7 @@ namespace animator {
return $ui.mouse(x, y, mods);
}
void UI::update_status(animate2::Animate2& anim) {
void UI::update_status(animation::Animation& anim) {
$overlay.show_text("form", guecs::to_wstring(anim.form_name));
$overlay.show_text("sequence", guecs::to_wstring(anim.sequence_name));
$overlay.show_text("transform", guecs::to_wstring(anim.transform_name));