summaryrefslogtreecommitdiffhomepage
path: root/anim-crop-tool
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-11-07 08:11:35 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-11-07 08:14:07 +0100
commit29d5693a1ccebe7ff6c6b3d9a1088753c291fde8 (patch)
tree02ba70f1afdf04776813aa53329fab85bf57f62a /anim-crop-tool
parentdbb6d49a5632a26885e6e388128d68fe1932a4ea (diff)
actually reenable ground out of bounds
Diffstat (limited to 'anim-crop-tool')
-rw-r--r--anim-crop-tool/main.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/anim-crop-tool/main.cpp b/anim-crop-tool/main.cpp
index 48a1e0c7..ad92780f 100644
--- a/anim-crop-tool/main.cpp
+++ b/anim-crop-tool/main.cpp
@@ -121,15 +121,9 @@ static bool load_file(anim_group& group, options& opts, anim_atlas& atlas, const
(int)std::round(((int)group.ground[1] - start[1]) * opts.scale),
};
- if (ground[0] < 0 || ground[1] < 0 || ground[0] >= dest_size.width || ground[1] >= dest_size.height)
- {
- Error{} << "ground marker for group" << group.name << "beyond image bounds";
- return false;
- }
-
const Vector2ui dest_size_ = { (unsigned)dest_size.width, (unsigned)dest_size.height };
- group.frames.push_back({Vector2ui(ground), atlas.offset(), dest_size_});
+ group.frames.push_back({ground, atlas.offset(), dest_size_});
atlas.add_entry({&group.frames.back(), std::move(resized)});
return true;
}