diff options
| author | inspectredc <inspectredc@gmail.com> | 2025-03-04 12:22:26 +0000 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-03-09 17:26:40 -0600 |
| commit | 445b7dad7d7604e09f7a9a4d39009dc471c99ba5 (patch) | |
| tree | a5a63b5ea71f54f0654492260d6791da7582e41d /src/factories/TextureFactory.cpp | |
| parent | 359ad0d884c91aab97a9113be9bb78be9e0f6844 (diff) | |
Add to config
Diffstat (limited to 'src/factories/TextureFactory.cpp')
| -rw-r--r-- | src/factories/TextureFactory.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/factories/TextureFactory.cpp b/src/factories/TextureFactory.cpp index ca88fcb..75b6796 100644 --- a/src/factories/TextureFactory.cpp +++ b/src/factories/TextureFactory.cpp @@ -61,12 +61,16 @@ ExportResult TextureHeaderExporter::Export(std::ostream &write, std::shared_ptr< } else { if(isOTR){ write << "static const ALIGN_ASSET(2) char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\n"; - write << "#define _" << symbol << "_WIDTH 0x" << std::hex << texture->mWidth << std::dec << "\n"; - write << "#define _" << symbol << "_HEIGHT 0x" << std::hex << texture->mHeight << std::dec << "\n"; + if (Companion::Instance->AddTextureDefines()) { + write << "#define _" << symbol << "_WIDTH 0x" << std::hex << texture->mWidth << std::dec << "\n"; + write << "#define _" << symbol << "_HEIGHT 0x" << std::hex << texture->mHeight << std::dec << "\n"; + } } else { write << "extern " << GetSafeNode<std::string>(node, "ctype", "u8") << " " << symbol << "[];\n"; - write << "#define _" << symbol << "_WIDTH 0x" << std::hex << texture->mWidth << std::dec << "\n"; - write << "#define _" << symbol << "_HEIGHT 0x" << std::hex << texture->mHeight << std::dec << "\n"; + if (Companion::Instance->AddTextureDefines()) { + write << "#define _" << symbol << "_WIDTH 0x" << std::hex << texture->mWidth << std::dec << "\n"; + write << "#define _" << symbol << "_HEIGHT 0x" << std::hex << texture->mHeight << std::dec << "\n"; + } } } |
