diff options
author | Lukas Rusak <lorusak@gmail.com> | 2023-04-13 15:05:22 -0700 |
---|---|---|
committer | Lukas Rusak <lorusak@gmail.com> | 2023-05-12 20:50:24 -0700 |
commit | 4e0b732371fae989307fc8eb23bdf6a56f4bb8bb (patch) | |
tree | fc5a2e3f46f594259fd8592c89f2e213d5080997 /tools | |
parent | 32e32a77b2a0f1af2f06b3a3a9504c31441a40bf (diff) |
TexturePacker: add method to enable verbose output
Signed-off-by: Lukas Rusak <lorusak@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/native/TexturePacker/src/DecoderManager.h | 4 | ||||
-rw-r--r-- | tools/depends/native/TexturePacker/src/TexturePacker.cpp | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tools/depends/native/TexturePacker/src/DecoderManager.h b/tools/depends/native/TexturePacker/src/DecoderManager.h index 1337c9d7a3..8fef4c0e07 100644 --- a/tools/depends/native/TexturePacker/src/DecoderManager.h +++ b/tools/depends/native/TexturePacker/src/DecoderManager.h @@ -33,8 +33,10 @@ class DecoderManager bool IsSupportedGraphicsFile(std::string_view filename); bool LoadFile(const std::string& filename, DecodedFrames& frames); - bool verbose; + void EnableVerboseOutput() { verbose = true; } private: std::vector<std::unique_ptr<IDecoder>> m_decoders; + + bool verbose{false}; }; diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp index f984cbfa7d..f2e008dbc8 100644 --- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp +++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp @@ -107,9 +107,9 @@ public: void EnableDupeCheck() { m_dupecheck = true; } - int createBundle(const std::string& InputDir, const std::string& OutputFile); + void EnableVerboseOutput() { decoderManager.EnableVerboseOutput(); } - DecoderManager decoderManager; + int createBundle(const std::string& InputDir, const std::string& OutputFile); void SetFlags(unsigned int flags) { m_flags = flags; } @@ -125,6 +125,8 @@ private: std::vector<unsigned int>& dupes, unsigned int pos); + DecoderManager decoderManager; + bool m_dupecheck{false}; unsigned int m_flags{0}; }; @@ -408,7 +410,7 @@ int main(int argc, char* argv[]) } else if (!strcmp(args[i], "-verbose")) { - texturePacker.decoderManager.verbose = true; + texturePacker.EnableVerboseOutput(); } else if (!platform_stricmp(args[i], "-output") || !platform_stricmp(args[i], "-o")) { |