aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLukas Rusak <lorusak@gmail.com>2023-05-04 20:12:44 -0700
committerLukas Rusak <lorusak@gmail.com>2023-05-12 20:45:15 -0700
commit9570bbfa589e3ceef5b2294fe16482dd61386419 (patch)
tree14470e7190b4bc2d3e461fa4a282003b3f1d9b3d /tools
parentd407f2be4efb8691348269d552c35f09df86542e (diff)
TexturePacker: createXBTFFrame pass DecodedFrame instead of RGBAImage
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/native/TexturePacker/src/TexturePacker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
index e1827aab2a..9a2d43660d 100644
--- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp
+++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp
@@ -169,13 +169,13 @@ void TexturePacker::CreateSkeletonHeader(CXBTFWriter& xbtfWriter,
}
}
-CXBTFFrame createXBTFFrame(RGBAImage& image, CXBTFWriter& writer, unsigned int flags)
+CXBTFFrame createXBTFFrame(DecodedFrame& decodedFrame, CXBTFWriter& writer, unsigned int flags)
{
- const unsigned int width = image.width;
- const unsigned int height = image.height;
+ const unsigned int width = decodedFrame.rgbaImage.width;
+ const unsigned int height = decodedFrame.rgbaImage.height;
const unsigned int size = width * height * 4;
const unsigned int format = XB_FMT_A8R8G8B8;
- unsigned char* data = (unsigned char*)image.pixels.data();
+ unsigned char* data = (unsigned char*)decodedFrame.rgbaImage.pixels.data();
const bool hasAlpha = HasAlpha(data, width, height);
@@ -330,7 +330,7 @@ int TexturePacker::createBundle(const std::string& InputDir,
{
for (unsigned int j = 0; j < frames.frameList.size(); j++)
{
- CXBTFFrame frame = createXBTFFrame(frames.frameList[j].rgbaImage, writer, flags);
+ CXBTFFrame frame = createXBTFFrame(frames.frameList[j], writer, flags);
frame.SetDuration(frames.frameList[j].delay);
file.GetFrames().push_back(frame);
printf(" frame %4i (delay:%4i) %s%c (%d,%d @ %" PRIu64