diff options
Diffstat (limited to 'src/anim-atlas.hpp')
| -rw-r--r-- | src/anim-atlas.hpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/anim-atlas.hpp b/src/anim-atlas.hpp index d05bbe77..36939f68 100644 --- a/src/anim-atlas.hpp +++ b/src/anim-atlas.hpp @@ -1,7 +1,7 @@ #pragma once #include "compat/defs.hpp" #include "scenery.hpp" -#include "serialize/anim.hpp" +#include "anim.hpp" #include <array> #include <Corrade/Containers/String.h> #include <Magnum/Math/Vector2.h> @@ -12,14 +12,11 @@ namespace floormat { struct anim_atlas final { - using anim_info = Serialize::anim; - using anim_group = Serialize::anim_group; - using anim_frame = Serialize::anim_frame; using texcoords = std::array<Vector2, 4>; using quad = std::array<Vector3, 4>; anim_atlas() noexcept; - anim_atlas(StringView name, const ImageView2D& tex, anim_info info) noexcept; + anim_atlas(StringView name, const ImageView2D& tex, anim_def info) noexcept; ~anim_atlas() noexcept; anim_atlas(anim_atlas&&) noexcept; @@ -27,7 +24,7 @@ struct anim_atlas final StringView name() const noexcept; GL::Texture2D& texture() noexcept; - const anim_info& info() const noexcept; + const anim_def& info() const noexcept; const anim_group& group(rotation r) const noexcept; const anim_frame& frame(rotation r, std::size_t frame) const noexcept; @@ -39,13 +36,13 @@ struct anim_atlas final private: GL::Texture2D _tex; String _name; - anim_info _info; + anim_def _info; std::array<std::uint8_t, (std::size_t)rotation::COUNT> _group_indices = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }; - static decltype(_group_indices) make_group_indices(const Serialize::anim& anim) noexcept; - static std::uint8_t rotation_to_index(const anim_info& a, rotation r) noexcept; + static decltype(_group_indices) make_group_indices(const anim_def& anim) noexcept; + static std::uint8_t rotation_to_index(const anim_def& a, rotation r) noexcept; }; } // namespace floormat |
