diff options
| author | KiritoDv <kiritodev01@gmail.com> | 2025-03-09 14:10:32 -0600 |
|---|---|---|
| committer | KiritoDv <kiritodev01@gmail.com> | 2025-03-09 14:10:32 -0600 |
| commit | 6ca699d508d2b62ab51d290e6a38a1a24f7d83cf (patch) | |
| tree | 367718812d176220e626245b24251c3a338a3d07 /src/Companion.cpp | |
| parent | 9d508fc94cd52ab90a64706906bc5307458dc7c0 (diff) | |
Implemented comment
Diffstat (limited to 'src/Companion.cpp')
| -rw-r--r-- | src/Companion.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Companion.cpp b/src/Companion.cpp index 885ca2f..7e9744d 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -733,6 +733,7 @@ void Companion::ProcessFile(YAML::Node root) { result.node["offset"].as<uint32_t>(), alignment, stream.str(), + GetNode<std::string>(result.node, "comment"), std::nullopt }; } else { @@ -743,6 +744,7 @@ void Companion::ProcessFile(YAML::Node root) { result.node["offset"].as<uint32_t>(), alignment, stream.str(), + GetNode<std::string>(result.node, "comment"), std::get<size_t>(endptr.value()) }; break; @@ -753,6 +755,7 @@ void Companion::ProcessFile(YAML::Node root) { oentry.start, alignment, stream.str(), + GetNode<std::string>(result.node, "comment"), oentry.end }; break; @@ -830,6 +833,11 @@ void Companion::ProcessFile(YAML::Node root) { for (size_t i = 0; i < entries.size(); i++) { const auto result = entries[i]; const auto hasSize = result.endptr.has_value(); + + if(result.comment.has_value()){ + stream << "// " << result.comment.value() << "\n"; + } + if (hasSize && this->IsDebug()) { stream << "// 0x" << std::hex << std::uppercase << ASSET_PTR(result.addr) << "\n"; } |
