From 6b06266eb8d35a7865aa1f942ecbe393e7cde740 Mon Sep 17 00:00:00 2001 From: Anghelo Carvajal Date: Fri, 1 Oct 2021 22:19:47 -0300 Subject: Add `--static` flag (#193) * remove static from every extracted asset * fix makefile * Move a bunch of code to Declaration * make static enablalble * fix texture static * clean up * minor fixes * Format * add small docs * fix * add table * add note in the readme * typo * maybe_unused * Add warning to ZSymbol * format * fix --- ZAPD/ZPath.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ZAPD/ZPath.cpp') diff --git a/ZAPD/ZPath.cpp b/ZAPD/ZPath.cpp index 97bb733..b57b3cc 100644 --- a/ZAPD/ZPath.cpp +++ b/ZAPD/ZPath.cpp @@ -17,8 +17,10 @@ void ZPath::ExtractFromXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) { ZResource::ExtractFromXML(reader, nRawDataIndex); - parent->AddDeclarationArray(rawDataIndex, DeclarationAlignment::Align4, pathways.size() * 8, - GetSourceTypeName(), name, pathways.size(), ""); + Declaration* decl = + parent->AddDeclarationArray(rawDataIndex, DeclarationAlignment::Align4, pathways.size() * 8, + GetSourceTypeName(), name, pathways.size(), ""); + decl->staticConf = staticConf; } void ZPath::ParseXML(tinyxml2::XMLElement* reader) @@ -86,10 +88,12 @@ std::string ZPath::GetSourceOutputCode([[maybe_unused]] const std::string& prefi Declaration* decl = parent->GetDeclaration(rawDataIndex); if (decl == nullptr || decl->isPlaceholder) - parent->AddDeclarationArray(rawDataIndex, DeclarationAlignment::Align4, pathways.size() * 8, - GetSourceTypeName(), name, pathways.size(), declaration); + decl = parent->AddDeclarationArray(rawDataIndex, DeclarationAlignment::Align4, + pathways.size() * 8, GetSourceTypeName(), name, + pathways.size(), declaration); else decl->text = declaration; + decl->staticConf = staticConf; return ""; } -- cgit v1.2.3