diff options
| author | inspectredc <inspectredc@gmail.com> | 2025-03-04 11:46:25 +0000 |
|---|---|---|
| committer | Lywx <kiritodev01@gmail.com> | 2025-03-09 17:26:40 -0600 |
| commit | c9c479c5c3c3bd3c652c30b4740c85d47a0fc5fa (patch) | |
| tree | 0d4108d5d1378b9004adc278e5e0bae5cdcaaa18 /src/factories/TextureFactory.cpp | |
| parent | 6ca699d508d2b62ab51d290e6a38a1a24f7d83cf (diff) | |
texture macros
Diffstat (limited to 'src/factories/TextureFactory.cpp')
| -rw-r--r-- | src/factories/TextureFactory.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/factories/TextureFactory.cpp b/src/factories/TextureFactory.cpp index 1165b62..d8e3a0c 100644 --- a/src/factories/TextureFactory.cpp +++ b/src/factories/TextureFactory.cpp @@ -57,12 +57,16 @@ ExportResult TextureHeaderExporter::Export(std::ostream &write, std::shared_ptr< } } else { write << "extern " << GetSafeNode<std::string>(node, "ctype", "u8") << " " << name << "[][" << isize << "];\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"; } } else { if(isOTR){ write << "static const ALIGN_ASSET(2) char " << symbol << "[] = \"__OTR__" << (*replacement) << "\";\n\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"; } } |
