summaryrefslogtreecommitdiff
path: root/ZAPD/ZPath.cpp
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-10-01 22:19:47 -0300
committerGitHub <noreply@github.com>2021-10-01 21:19:47 -0400
commit6b06266eb8d35a7865aa1f942ecbe393e7cde740 (patch)
tree6b23ec1617f1ae76f49079ccc9c93c7f4d06eff3 /ZAPD/ZPath.cpp
parent26b00a2431a70ff190a2b22ee1faf77afa75a034 (diff)
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
Diffstat (limited to 'ZAPD/ZPath.cpp')
-rw-r--r--ZAPD/ZPath.cpp12
1 files changed, 8 insertions, 4 deletions
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 "";
}