diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2021-07-25 07:59:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-25 07:59:05 -0400 |
| commit | 820678b4e97958d59b45597951841c129044cd45 (patch) | |
| tree | 374edb8f657cdce491683ad67fbebf892d252c4a /ZAPD/ZFile.cpp | |
| parent | 39ab063ebc48ceeafc552d66a156f046c02a38bc (diff) | |
Add options for warning or erroring on missing "Offset" node (#156)
* done
* Fixes
* Change
* revert
Diffstat (limited to 'ZAPD/ZFile.cpp')
| -rw-r--r-- | ZAPD/ZFile.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp index 9502214..b09dc55 100644 --- a/ZAPD/ZFile.cpp +++ b/ZAPD/ZFile.cpp @@ -161,6 +161,15 @@ void ZFile::ParseXML(ZFileMode mode, XMLElement* reader, std::string filename, b } offsetSet.insert(offsetXml); } + else if (Globals::Instance->warnNoOffset) + { + fprintf(stderr, "Warning No offset specified for: %s", nameXml); + } + else if (Globals::Instance->errorNoOffset) + { + throw std::runtime_error( + StringHelper::Sprintf("Error no offset specified for %s", nameXml)); + } if (outNameXml != nullptr) { if (outNameSet.find(outNameXml) != outNameSet.end()) @@ -589,7 +598,7 @@ void ZFile::GenerateSourceFiles(fs::path outputDir) Globals::Instance->cfg.texturePool.end()) { incStr = Globals::Instance->cfg.texturePool[tex->hash].path.string() + "." + - res->GetExternalExtension() + ".inc"; + res->GetExternalExtension() + ".inc"; } } |
