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/sf64/MessageLookupFactory.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/sf64/MessageLookupFactory.cpp')
| -rw-r--r-- | src/factories/sf64/MessageLookupFactory.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/factories/sf64/MessageLookupFactory.cpp b/src/factories/sf64/MessageLookupFactory.cpp index 5317a40..6aeae05 100644 --- a/src/factories/sf64/MessageLookupFactory.cpp +++ b/src/factories/sf64/MessageLookupFactory.cpp @@ -21,17 +21,6 @@ ExportResult SF64::MessageLookupCodeExporter::Export(std::ostream &write, std::s const auto symbol = GetSafeNode(node, "symbol", entryName); auto offset = GetSafeNode<uint32_t>(node, "offset"); - if (IS_SEGMENTED(offset)) { - offset = SEGMENT_OFFSET(offset); - } - - if (Companion::Instance->IsDebug()) { - if (IS_SEGMENTED(offset)) { - offset = SEGMENT_OFFSET(offset); - } - write << "// 0x" << std::hex << std::uppercase << offset << "\n"; - } - write << "// clang-format on\n"; write << "MsgLookup " << symbol << "[] = {\n" << fourSpaceTab; for (int i = 0; i < table.size(); ++i) { @@ -52,7 +41,7 @@ ExportResult SF64::MessageLookupCodeExporter::Export(std::ostream &write, std::s } write << "\n};\n"; - return (IS_SEGMENTED(offset) ? SEGMENT_OFFSET(offset) : offset) + table.size() * sizeof(uint16_t); + return offset + table.size() * sizeof(uint16_t); } ExportResult SF64::MessageLookupBinaryExporter::Export(std::ostream &write, std::shared_ptr<IParsedData> raw, std::string& entryName, YAML::Node &node, std::string* replacement ) { |
