Big refactor, shuffling a lot of files around
This commit is contained in:
35
src/anm2/animation.h
Normal file
35
src/anm2/animation.h
Normal 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();
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user