diff options
-rw-r--r-- | anim-crop-tool/atlas.cpp | 2 | ||||
-rw-r--r-- | anim-crop-tool/main.cpp | 2 | ||||
-rw-r--r-- | serialize/anim.hpp | 3 |
3 files changed, 3 insertions, 4 deletions
diff --git a/anim-crop-tool/atlas.cpp b/anim-crop-tool/atlas.cpp index 8ee52054..05575298 100644 --- a/anim-crop-tool/atlas.cpp +++ b/anim-crop-tool/atlas.cpp @@ -12,7 +12,7 @@ void anim_atlas_row::add_entry(const anim_atlas_entry& x) auto& frame = *x.frame; const auto& mat = x.mat; frame.offset = {xpos, ypos}; - frame.size = {(unsigned)mat.cols, (unsigned)mat.rows}; + frame.size = {mat.cols, mat.rows}; ASSERT(mat.rows > 0 && mat.cols > 0); data.push_back(x); diff --git a/anim-crop-tool/main.cpp b/anim-crop-tool/main.cpp index d1115bdc..a95d3bae 100644 --- a/anim-crop-tool/main.cpp +++ b/anim-crop-tool/main.cpp @@ -117,7 +117,7 @@ static bool load_file(anim_group& group, options& opts, anim_atlas& atlas, const (int)std::round((group.ground[1] - start[1]) * opts.scale), }; - group.frames.push_back({ground, atlas.offset(), {(unsigned)dest_size.width, (unsigned)dest_size.height}}); + group.frames.push_back({ground, atlas.offset(), {dest_size.width, dest_size.height}}); atlas.add_entry({&group.frames.back(), std::move(resized)}); return true; } diff --git a/serialize/anim.hpp b/serialize/anim.hpp index 41ff5108..6a78f9dd 100644 --- a/serialize/anim.hpp +++ b/serialize/anim.hpp @@ -14,8 +14,7 @@ namespace Magnum::Examples::Serialize { struct anim_frame final { - Vector2i ground, offset; - Vector2ui size; + Vector2i ground, offset, size; }; enum class anim_direction : unsigned char |