diff options
author | Markus Härer <markus.haerer@gmx.net> | 2023-06-09 03:05:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-09 03:05:30 +0200 |
commit | 57d58255f3fbffe7bf7567c16cd1d17d8afa29ba (patch) | |
tree | 7d23b8b6a3925fe51f5a036ea7645907d981ce71 /tools | |
parent | c69214125e7a1b2065931e8e9f956266c1942e1e (diff) | |
parent | 1a154823e62286ac142d8993495224a3050fa40f (diff) |
Merge pull request #23240 from lrusak/textureformats-enum
TextureFormats.h: use XB_FMT as an enum
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/native/TexturePacker/src/TexturePacker.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp index 99ceeaa96b..38c31f500c 100644 --- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp +++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp @@ -197,7 +197,7 @@ CXBTFFrame TexturePacker::CreateXBTFFrame(DecodedFrame& decodedFrame, CXBTFWrite 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; + const XB_FMT format = XB_FMT_A8R8G8B8; unsigned char* data = (unsigned char*)decodedFrame.rgbaImage.pixels.data(); const bool hasAlpha = HasAlpha(data, width, height); @@ -246,7 +246,7 @@ CXBTFFrame TexturePacker::CreateXBTFFrame(DecodedFrame& decodedFrame, CXBTFWrite frame.SetUnpackedSize(size); frame.SetWidth(width); frame.SetHeight(height); - frame.SetFormat(hasAlpha ? format : format | XB_FMT_OPAQUE); + frame.SetFormat(hasAlpha ? format : static_cast<XB_FMT>(format | XB_FMT_OPAQUE)); frame.SetDuration(delay); return frame; } |