diff options
| author | Lywx <kiritodev01@gmail.com> | 2024-03-22 09:59:49 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-22 09:59:49 -0600 |
| commit | aaa68d2ebcb732d7d18af1a41a292c50182e7fd5 (patch) | |
| tree | 4b93c2a1899e6b2ebfcfe7cf4c2c06e8461c6aa4 /src/factories/mk64/CourseVtx.cpp | |
| parent | 6e9f82312178d1fbc002a04ce97cf8b5add1f402 (diff) | |
Cleanup (#49)
* Auto debug info generation and some cleanup
* Cleaned dry code from segments
* Fixed gCurrentCompressionType bss bs
Diffstat (limited to 'src/factories/mk64/CourseVtx.cpp')
| -rw-r--r-- | src/factories/mk64/CourseVtx.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/factories/mk64/CourseVtx.cpp b/src/factories/mk64/CourseVtx.cpp index 524ae6b..d1d9b3a 100644 --- a/src/factories/mk64/CourseVtx.cpp +++ b/src/factories/mk64/CourseVtx.cpp @@ -23,10 +23,6 @@ ExportResult MK64::CourseVtxCodeExporter::Export(std::ostream &write, std::share const auto symbol = GetSafeNode(node, "symbol", entryName); const auto offset = GetSafeNode<uint32_t>(node, "offset"); - if (Companion::Instance->IsDebug()) { - write << "// 0x" << std::hex << std::uppercase << offset << "\n"; - } - write << "CourseVtx " << symbol << "[] = {\n"; for (int i = 0; i < vtx.size(); ++i) { @@ -51,13 +47,9 @@ ExportResult MK64::CourseVtxCodeExporter::Export(std::ostream &write, std::share // {{{ x, y, z }, { tc1, tc2 }, { c1, c2, c3, c4 }}} write << "{{{" << NUM(x) << ", " << NUM(y) << ", " << NUM(z) << "}, {" << NUM(tc1) << ", " << NUM(tc2) << "}, {" << COL(c1) << ", " << COL(c2) << ", " << COL(c3) << ", " << COL(c4) << "}}},\n"; } + write << "};\n"; - if (Companion::Instance->IsDebug()) { - write << fourSpaceTab << "// 0x" << std::hex << std::uppercase << (offset + (sizeof(CourseVtx) * vtx.size())) << "\n"; - } - - write << "};\n\n"; - return std::nullopt; + return offset + vtx.size() * sizeof(CourseVtx); } ExportResult MK64::CourseVtxBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) { |
