queue oh el
This commit is contained in:
@@ -419,6 +419,7 @@ namespace anm2ed::anm2
|
||||
std::unordered_map<int, glm::ivec2> offsets{};
|
||||
offsets[baseId] = {};
|
||||
|
||||
auto baseTextureSize = base.texture.size;
|
||||
auto mergedTexture = base.texture;
|
||||
for (auto id : ids)
|
||||
{
|
||||
@@ -446,6 +447,20 @@ namespace anm2ed::anm2
|
||||
base.regionOrder.push_back(id);
|
||||
}
|
||||
|
||||
auto baseLocationRegionID = map::next_id_get(base.regions);
|
||||
auto baseFilename = path::to_utf8(base.path.stem());
|
||||
auto baseLocationRegionName = baseFilename.empty() ? std::format("#{}", baseId) : baseFilename;
|
||||
auto baseLocationRegionPivot =
|
||||
regionOrigin == origin::ORIGIN_CENTER ? glm::vec2(baseTextureSize) * 0.5f : glm::vec2();
|
||||
base.regions[baseLocationRegionID] = {
|
||||
.name = baseLocationRegionName,
|
||||
.crop = {},
|
||||
.pivot = glm::ivec2(baseLocationRegionPivot),
|
||||
.size = baseTextureSize,
|
||||
.origin = regionOrigin,
|
||||
};
|
||||
base.regionOrder.push_back(baseLocationRegionID);
|
||||
|
||||
for (auto id : ids)
|
||||
{
|
||||
if (id == baseId) continue;
|
||||
|
||||
Reference in New Issue
Block a user