diff options
| author | Adam Bird <Archez@users.noreply.github.com> | 2023-11-05 12:23:45 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-05 12:23:45 -0500 |
| commit | eff29036118349e142ee8efca80fd975a2a2b6ff (patch) | |
| tree | 65fbb8dc86b7d14407239560b856ba405ff272b6 | |
| parent | 9b8e224dac83aa8e47a688884ad48725f18fc293 (diff) | |
Place shared scenes in their own location (#16)
* separate shard scenes from dungeon scenes when generating headers
* use regex for only main dungeons
| -rw-r--r-- | ZAPD/ZResource.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ZAPD/ZResource.cpp b/ZAPD/ZResource.cpp index aacc7af..fdb8d13 100644 --- a/ZAPD/ZResource.cpp +++ b/ZAPD/ZResource.cpp @@ -332,8 +332,16 @@ std::string ZResource::GetSourceOutputHeader([[maybe_unused]] const std::string& std::string xmlPath = StringHelper::Replace(parent->GetXmlFilePath().string(), "\\", "/"); - if (StringHelper::Contains(outName, "_room_") || StringHelper::Contains(outName, "_scene")) - prefix = "scenes/nonmq"; + if (StringHelper::Contains(outName, "_room_") || StringHelper::Contains(outName, "_scene")) { + prefix = "scenes/shared"; + + // Regex for xml paths that are dungeons with unique MQ variants (only the main dungeon, not boss rooms) + std::regex dungeonsWithMQ(R"(((ydan)|(ddan)|(bdan)|(Bmori1)|(HIDAN)|(MIZUsin)|(jyasinzou)|(HAKAdan)|(HAKAdanCH)|(ice_doukutu)|(men)|(ganontika))\.xml)"); + + if (StringHelper::Contains(xmlPath, "dungeons/") && std::regex_search(xmlPath, dungeonsWithMQ)) { + prefix = "scenes/nonmq"; + } + } else if (StringHelper::Contains(xmlPath, "objects/")) prefix = "objects"; else if (StringHelper::Contains(xmlPath, "textures/")) |
