summaryrefslogtreecommitdiff
path: root/ZAPD/ZFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD/ZFile.cpp')
-rw-r--r--ZAPD/ZFile.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp
index 4626473..1f4b92b 100644
--- a/ZAPD/ZFile.cpp
+++ b/ZAPD/ZFile.cpp
@@ -128,6 +128,9 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename)
if (reader->Attribute("RangeEnd") != nullptr)
rangeEnd = StringHelper::StrToL(reader->Attribute("RangeEnd"), 16);
+ if (reader->Attribute("Compilable") != nullptr)
+ isCompilable = true;
+
if (rangeStart > rangeEnd)
HANDLE_ERROR_PROCESS(
WarningType::Always,
@@ -261,16 +264,19 @@ void ZFile::ParseXML(tinyxml2::XMLElement* reader, const std::string& filename)
}
nameSet.insert(nameXml);
}
-
+
std::string nodeName = std::string(child->Name());
if (nodeMap.find(nodeName) != nodeMap.end())
{
ZResource* nRes = nodeMap[nodeName](this);
- if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile || mode == ZFileMode::ExtractDirectory)
- nRes->ExtractFromXML(child, rawDataIndex);
-
+ if (mode == ZFileMode::Extract || mode == ZFileMode::ExternalFile ||
+ mode == ZFileMode::ExtractDirectory)
+ {
+ if (!isCompilable)
+ nRes->ExtractFromXML(child, rawDataIndex);
+ }
switch (nRes->GetResourceType())
{
case ZResourceType::Texture: