Big refactor, shuffling a lot of files around

This commit is contained in:
2025-11-01 19:51:19 -04:00
parent 99b7d9f49d
commit 62cd94ca78
125 changed files with 4073 additions and 3011 deletions

35
src/anm2/animation.h Normal file
View File

@@ -0,0 +1,35 @@
#pragma once
#include <map>
#include <string>
#include "item.h"
namespace anm2ed::anm2
{
constexpr auto FRAME_NUM_MIN = 1;
constexpr auto FRAME_NUM_MAX = FRAME_DELAY_MAX;
class Animation
{
public:
std::string name{"New Animation"};
int frameNum{FRAME_NUM_MIN};
bool isLoop{true};
Item rootAnimation;
std::unordered_map<int, Item> layerAnimations{};
std::vector<int> layerOrder{};
std::map<int, Item> nullAnimations{};
Item triggers;
Animation() = default;
Animation(tinyxml2::XMLElement*);
Item* item_get(Type, int = -1);
void item_remove(Type, int = -1);
void serialize(tinyxml2::XMLDocument&, tinyxml2::XMLElement*);
int length();
glm::vec4 rect(bool);
std::string to_string();
};
}