mirror of
https://github.com/NoelFB/blah.git
synced 2024-11-25 16:18:57 +08:00
fix incorrect pixel offset in asset packer trim
This commit is contained in:
parent
c204842d2c
commit
20a6d9411d
|
@ -40,7 +40,7 @@ void Packer::add_entry(u64 id, int w, int h, const Color* pixels, const Recti& s
|
||||||
|
|
||||||
// TOP:
|
// TOP:
|
||||||
for (int y = source.y; y < source.y + source.h; y++)
|
for (int y = source.y; y < source.y + source.h; y++)
|
||||||
for (int x = source.x, s = y * w; x < source.x + source.w; x++, s++)
|
for (int x = source.x, s = x + y * w; x < source.x + source.w; x++, s++)
|
||||||
if (pixels[s].a > 0)
|
if (pixels[s].a > 0)
|
||||||
{
|
{
|
||||||
top = y;
|
top = y;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user