diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-03-08 13:24:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-08 14:24:58 -0600 |
| commit | f06ed7388df76f09d8fbda765acea5d2923553d4 (patch) | |
| tree | dfb2d060b88a3d6fd62178a669307c2aa9973b10 /src/factories/VtxFactory.cpp | |
| parent | cfd2ec35ce03a36c10b005b952f765f035c8b836 (diff) | |
Detect Compression Type and Improve Yaml Structure (#21)
* Auto detect mio0
* Altered decompressor
* Fix bug
* Bug fix
* fix
* debugging
* fix debug
* Remove logging
* Fix spacing
* node change
* Cleanup
* Track compression offset using global var
* Implementation
* Renames
* Simplification
* Fixes
* Fix debugging output
* yaml config segments uses array style
* Fix to_hex zero fill
* Bug fixes
---------
Co-authored-by: = <=>
Diffstat (limited to 'src/factories/VtxFactory.cpp')
| -rw-r--r-- | src/factories/VtxFactory.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/factories/VtxFactory.cpp b/src/factories/VtxFactory.cpp index 7b74681..d506a39 100644 --- a/src/factories/VtxFactory.cpp +++ b/src/factories/VtxFactory.cpp @@ -1,4 +1,5 @@ #include "VtxFactory.h" +#include "spdlog/spdlog.h" #include "Companion.h" #include "utils/Decompressor.h" @@ -20,7 +21,11 @@ void VtxHeaderExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> void VtxCodeExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) { auto vtx = std::static_pointer_cast<VtxData>(raw)->mVtxs; const auto symbol = GetSafeNode(node, "symbol", entryName); - const auto offset = GetSafeNode<uint32_t>(node, "offset"); + auto offset = GetSafeNode<uint32_t>(node, "offset"); + + if (IS_SEGMENTED(offset)) { + offset = SEGMENT_OFFSET(offset); + } if (Companion::Instance->IsDebug()) { write << "// 0x" << std::hex << std::uppercase << offset << "\n"; |
